
bin/kernel_nopage：     文件格式 elf32-i386


Disassembly of section .text:

00100000 <kern_entry>:

.text
.globl kern_entry
kern_entry:
    # load pa of boot pgdir
    movl $REALLOC(__boot_pgdir), %eax
  100000:	b8 00 a0 11 40       	mov    $0x4011a000,%eax
    movl %eax, %cr3
  100005:	0f 22 d8             	mov    %eax,%cr3

    # enable paging
    movl %cr0, %eax
  100008:	0f 20 c0             	mov    %cr0,%eax
    orl $(CR0_PE | CR0_PG | CR0_AM | CR0_WP | CR0_NE | CR0_TS | CR0_EM | CR0_MP), %eax
  10000b:	0d 2f 00 05 80       	or     $0x8005002f,%eax
    andl $~(CR0_TS | CR0_EM), %eax
  100010:	83 e0 f3             	and    $0xfffffff3,%eax
    movl %eax, %cr0
  100013:	0f 22 c0             	mov    %eax,%cr0

    # update eip
    # now, eip = 0x1.....
    leal next, %eax
  100016:	8d 05 1e 00 10 00    	lea    0x10001e,%eax
    # set eip = KERNBASE + 0x1.....
    jmp *%eax
  10001c:	ff e0                	jmp    *%eax

0010001e <next>:
next:

    # unmap va 0 ~ 4M, it's temporary mapping
    xorl %eax, %eax
  10001e:	31 c0                	xor    %eax,%eax
    movl %eax, __boot_pgdir
  100020:	a3 00 a0 11 00       	mov    %eax,0x11a000

    # set ebp, esp
    movl $0x0, %ebp
  100025:	bd 00 00 00 00       	mov    $0x0,%ebp
    # the kernel stack region is from bootstack -- bootstacktop,
    # the kernel stack size is KSTACKSIZE (8KB)defined in memlayout.h
    movl $bootstacktop, %esp
  10002a:	bc 00 90 11 00       	mov    $0x119000,%esp
    # now kernel stack is ready , call the first C function
    call kern_init
  10002f:	e8 02 00 00 00       	call   100036 <kern_init>

00100034 <spin>:

# should never get here
spin:
    jmp spin
  100034:	eb fe                	jmp    100034 <spin>

00100036 <kern_init>:
int kern_init(void) __attribute__((noreturn));
void grade_backtrace(void);
static void lab1_switch_test(void);

int
kern_init(void) {
  100036:	55                   	push   %ebp
  100037:	89 e5                	mov    %esp,%ebp
  100039:	83 ec 28             	sub    $0x28,%esp
    extern char edata[], end[];
    memset(edata, 0, end - edata);
  10003c:	b8 4c cf 11 00       	mov    $0x11cf4c,%eax
  100041:	2d 36 9a 11 00       	sub    $0x119a36,%eax
  100046:	89 44 24 08          	mov    %eax,0x8(%esp)
  10004a:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
  100051:	00 
  100052:	c7 04 24 36 9a 11 00 	movl   $0x119a36,(%esp)
  100059:	e8 4b 5e 00 00       	call   105ea9 <memset>

    cons_init();                // init the console
  10005e:	e8 fd 15 00 00       	call   101660 <cons_init>

    const char *message = "(THU.CST) os is loading ...";
  100063:	c7 45 f4 40 60 10 00 	movl   $0x106040,-0xc(%ebp)
    cprintf("%s\n\n", message);
  10006a:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10006d:	89 44 24 04          	mov    %eax,0x4(%esp)
  100071:	c7 04 24 5c 60 10 00 	movl   $0x10605c,(%esp)
  100078:	e8 e9 02 00 00       	call   100366 <cprintf>

    print_kerninfo();
  10007d:	e8 07 08 00 00       	call   100889 <print_kerninfo>

    grade_backtrace();
  100082:	e8 95 00 00 00       	call   10011c <grade_backtrace>

    pmm_init();                 // init physical memory management
  100087:	e8 27 45 00 00       	call   1045b3 <pmm_init>

    pic_init();                 // init interrupt controller
  10008c:	e8 50 17 00 00       	call   1017e1 <pic_init>
    idt_init();                 // init interrupt descriptor table
  100091:	e8 b4 18 00 00       	call   10194a <idt_init>

    clock_init();               // init clock interrupt
  100096:	e8 24 0d 00 00       	call   100dbf <clock_init>
    intr_enable();              // enable irq interrupt
  10009b:	e8 9f 16 00 00       	call   10173f <intr_enable>

    //LAB1: CAHLLENGE 1 If you try to do it, uncomment lab1_switch_test()
    // user/kernel mode switch test
    lab1_switch_test();
  1000a0:	e8 76 01 00 00       	call   10021b <lab1_switch_test>

    /* do nothing */
    while (1);
  1000a5:	eb fe                	jmp    1000a5 <kern_init+0x6f>

001000a7 <grade_backtrace2>:
}

void __attribute__((noinline))
grade_backtrace2(int arg0, int arg1, int arg2, int arg3) {
  1000a7:	55                   	push   %ebp
  1000a8:	89 e5                	mov    %esp,%ebp
  1000aa:	83 ec 18             	sub    $0x18,%esp
    mon_backtrace(0, NULL, NULL);
  1000ad:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  1000b4:	00 
  1000b5:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
  1000bc:	00 
  1000bd:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  1000c4:	e8 11 0c 00 00       	call   100cda <mon_backtrace>
}
  1000c9:	90                   	nop
  1000ca:	89 ec                	mov    %ebp,%esp
  1000cc:	5d                   	pop    %ebp
  1000cd:	c3                   	ret    

001000ce <grade_backtrace1>:

void __attribute__((noinline))
grade_backtrace1(int arg0, int arg1) {
  1000ce:	55                   	push   %ebp
  1000cf:	89 e5                	mov    %esp,%ebp
  1000d1:	83 ec 18             	sub    $0x18,%esp
  1000d4:	89 5d fc             	mov    %ebx,-0x4(%ebp)
    grade_backtrace2(arg0, (int)&arg0, arg1, (int)&arg1);
  1000d7:	8d 4d 0c             	lea    0xc(%ebp),%ecx
  1000da:	8b 55 0c             	mov    0xc(%ebp),%edx
  1000dd:	8d 5d 08             	lea    0x8(%ebp),%ebx
  1000e0:	8b 45 08             	mov    0x8(%ebp),%eax
  1000e3:	89 4c 24 0c          	mov    %ecx,0xc(%esp)
  1000e7:	89 54 24 08          	mov    %edx,0x8(%esp)
  1000eb:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  1000ef:	89 04 24             	mov    %eax,(%esp)
  1000f2:	e8 b0 ff ff ff       	call   1000a7 <grade_backtrace2>
}
  1000f7:	90                   	nop
  1000f8:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  1000fb:	89 ec                	mov    %ebp,%esp
  1000fd:	5d                   	pop    %ebp
  1000fe:	c3                   	ret    

001000ff <grade_backtrace0>:

void __attribute__((noinline))
grade_backtrace0(int arg0, int arg1, int arg2) {
  1000ff:	55                   	push   %ebp
  100100:	89 e5                	mov    %esp,%ebp
  100102:	83 ec 18             	sub    $0x18,%esp
    grade_backtrace1(arg0, arg2);
  100105:	8b 45 10             	mov    0x10(%ebp),%eax
  100108:	89 44 24 04          	mov    %eax,0x4(%esp)
  10010c:	8b 45 08             	mov    0x8(%ebp),%eax
  10010f:	89 04 24             	mov    %eax,(%esp)
  100112:	e8 b7 ff ff ff       	call   1000ce <grade_backtrace1>
}
  100117:	90                   	nop
  100118:	89 ec                	mov    %ebp,%esp
  10011a:	5d                   	pop    %ebp
  10011b:	c3                   	ret    

0010011c <grade_backtrace>:

void
grade_backtrace(void) {
  10011c:	55                   	push   %ebp
  10011d:	89 e5                	mov    %esp,%ebp
  10011f:	83 ec 18             	sub    $0x18,%esp
    grade_backtrace0(0, (int)kern_init, 0xffff0000);
  100122:	b8 36 00 10 00       	mov    $0x100036,%eax
  100127:	c7 44 24 08 00 00 ff 	movl   $0xffff0000,0x8(%esp)
  10012e:	ff 
  10012f:	89 44 24 04          	mov    %eax,0x4(%esp)
  100133:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  10013a:	e8 c0 ff ff ff       	call   1000ff <grade_backtrace0>
}
  10013f:	90                   	nop
  100140:	89 ec                	mov    %ebp,%esp
  100142:	5d                   	pop    %ebp
  100143:	c3                   	ret    

00100144 <lab1_print_cur_status>:

static void
lab1_print_cur_status(void) {
  100144:	55                   	push   %ebp
  100145:	89 e5                	mov    %esp,%ebp
  100147:	83 ec 28             	sub    $0x28,%esp
    static int round = 0;
    uint16_t reg1, reg2, reg3, reg4;
    asm volatile (
  10014a:	8c 4d f6             	mov    %cs,-0xa(%ebp)
  10014d:	8c 5d f4             	mov    %ds,-0xc(%ebp)
  100150:	8c 45 f2             	mov    %es,-0xe(%ebp)
  100153:	8c 55 f0             	mov    %ss,-0x10(%ebp)
            "mov %%cs, %0;"
            "mov %%ds, %1;"
            "mov %%es, %2;"
            "mov %%ss, %3;"
            : "=m"(reg1), "=m"(reg2), "=m"(reg3), "=m"(reg4));
    cprintf("%d: @ring %d\n", round, reg1 & 3);
  100156:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  10015a:	83 e0 03             	and    $0x3,%eax
  10015d:	89 c2                	mov    %eax,%edx
  10015f:	a1 00 c0 11 00       	mov    0x11c000,%eax
  100164:	89 54 24 08          	mov    %edx,0x8(%esp)
  100168:	89 44 24 04          	mov    %eax,0x4(%esp)
  10016c:	c7 04 24 61 60 10 00 	movl   $0x106061,(%esp)
  100173:	e8 ee 01 00 00       	call   100366 <cprintf>
    cprintf("%d:  cs = %x\n", round, reg1);
  100178:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  10017c:	89 c2                	mov    %eax,%edx
  10017e:	a1 00 c0 11 00       	mov    0x11c000,%eax
  100183:	89 54 24 08          	mov    %edx,0x8(%esp)
  100187:	89 44 24 04          	mov    %eax,0x4(%esp)
  10018b:	c7 04 24 6f 60 10 00 	movl   $0x10606f,(%esp)
  100192:	e8 cf 01 00 00       	call   100366 <cprintf>
    cprintf("%d:  ds = %x\n", round, reg2);
  100197:	0f b7 45 f4          	movzwl -0xc(%ebp),%eax
  10019b:	89 c2                	mov    %eax,%edx
  10019d:	a1 00 c0 11 00       	mov    0x11c000,%eax
  1001a2:	89 54 24 08          	mov    %edx,0x8(%esp)
  1001a6:	89 44 24 04          	mov    %eax,0x4(%esp)
  1001aa:	c7 04 24 7d 60 10 00 	movl   $0x10607d,(%esp)
  1001b1:	e8 b0 01 00 00       	call   100366 <cprintf>
    cprintf("%d:  es = %x\n", round, reg3);
  1001b6:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  1001ba:	89 c2                	mov    %eax,%edx
  1001bc:	a1 00 c0 11 00       	mov    0x11c000,%eax
  1001c1:	89 54 24 08          	mov    %edx,0x8(%esp)
  1001c5:	89 44 24 04          	mov    %eax,0x4(%esp)
  1001c9:	c7 04 24 8b 60 10 00 	movl   $0x10608b,(%esp)
  1001d0:	e8 91 01 00 00       	call   100366 <cprintf>
    cprintf("%d:  ss = %x\n", round, reg4);
  1001d5:	0f b7 45 f0          	movzwl -0x10(%ebp),%eax
  1001d9:	89 c2                	mov    %eax,%edx
  1001db:	a1 00 c0 11 00       	mov    0x11c000,%eax
  1001e0:	89 54 24 08          	mov    %edx,0x8(%esp)
  1001e4:	89 44 24 04          	mov    %eax,0x4(%esp)
  1001e8:	c7 04 24 99 60 10 00 	movl   $0x106099,(%esp)
  1001ef:	e8 72 01 00 00       	call   100366 <cprintf>
    round ++;
  1001f4:	a1 00 c0 11 00       	mov    0x11c000,%eax
  1001f9:	40                   	inc    %eax
  1001fa:	a3 00 c0 11 00       	mov    %eax,0x11c000
}
  1001ff:	90                   	nop
  100200:	89 ec                	mov    %ebp,%esp
  100202:	5d                   	pop    %ebp
  100203:	c3                   	ret    

00100204 <lab1_switch_to_user>:

static void
lab1_switch_to_user(void) {
  100204:	55                   	push   %ebp
  100205:	89 e5                	mov    %esp,%ebp
    //LAB1 CHALLENGE 1 : TODO
    asm volatile (
  100207:	83 ec 08             	sub    $0x8,%esp
  10020a:	cd 78                	int    $0x78
  10020c:	89 ec                	mov    %ebp,%esp
	    "int %0 \n"
	    "movl %%ebp, %%esp"
	    : 
	    : "i"(T_SWITCH_TOU)
	);
}
  10020e:	90                   	nop
  10020f:	5d                   	pop    %ebp
  100210:	c3                   	ret    

00100211 <lab1_switch_to_kernel>:

static void
lab1_switch_to_kernel(void) {
  100211:	55                   	push   %ebp
  100212:	89 e5                	mov    %esp,%ebp
    //LAB1 CHALLENGE 1 :  TODO
    asm volatile (
  100214:	cd 79                	int    $0x79
  100216:	89 ec                	mov    %ebp,%esp
	    "int %0 \n"
	    "movl %%ebp, %%esp \n"
	    : 
	    : "i"(T_SWITCH_TOK)
	);
}
  100218:	90                   	nop
  100219:	5d                   	pop    %ebp
  10021a:	c3                   	ret    

0010021b <lab1_switch_test>:

static void
lab1_switch_test(void) {
  10021b:	55                   	push   %ebp
  10021c:	89 e5                	mov    %esp,%ebp
  10021e:	83 ec 18             	sub    $0x18,%esp
    lab1_print_cur_status();
  100221:	e8 1e ff ff ff       	call   100144 <lab1_print_cur_status>
    cprintf("+++ switch to  user  mode +++\n");
  100226:	c7 04 24 a8 60 10 00 	movl   $0x1060a8,(%esp)
  10022d:	e8 34 01 00 00       	call   100366 <cprintf>
    lab1_switch_to_user();
  100232:	e8 cd ff ff ff       	call   100204 <lab1_switch_to_user>
    lab1_print_cur_status();
  100237:	e8 08 ff ff ff       	call   100144 <lab1_print_cur_status>
    cprintf("+++ switch to kernel mode +++\n");
  10023c:	c7 04 24 c8 60 10 00 	movl   $0x1060c8,(%esp)
  100243:	e8 1e 01 00 00       	call   100366 <cprintf>
    lab1_switch_to_kernel();
  100248:	e8 c4 ff ff ff       	call   100211 <lab1_switch_to_kernel>
    lab1_print_cur_status();
  10024d:	e8 f2 fe ff ff       	call   100144 <lab1_print_cur_status>
}
  100252:	90                   	nop
  100253:	89 ec                	mov    %ebp,%esp
  100255:	5d                   	pop    %ebp
  100256:	c3                   	ret    

00100257 <readline>:
 * The readline() function returns the text of the line read. If some errors
 * are happened, NULL is returned. The return value is a global variable,
 * thus it should be copied before it is used.
 * */
char *
readline(const char *prompt) {
  100257:	55                   	push   %ebp
  100258:	89 e5                	mov    %esp,%ebp
  10025a:	83 ec 28             	sub    $0x28,%esp
    if (prompt != NULL) {
  10025d:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  100261:	74 13                	je     100276 <readline+0x1f>
        cprintf("%s", prompt);
  100263:	8b 45 08             	mov    0x8(%ebp),%eax
  100266:	89 44 24 04          	mov    %eax,0x4(%esp)
  10026a:	c7 04 24 e7 60 10 00 	movl   $0x1060e7,(%esp)
  100271:	e8 f0 00 00 00       	call   100366 <cprintf>
    }
    int i = 0, c;
  100276:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    while (1) {
        c = getchar();
  10027d:	e8 73 01 00 00       	call   1003f5 <getchar>
  100282:	89 45 f0             	mov    %eax,-0x10(%ebp)
        if (c < 0) {
  100285:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  100289:	79 07                	jns    100292 <readline+0x3b>
            return NULL;
  10028b:	b8 00 00 00 00       	mov    $0x0,%eax
  100290:	eb 78                	jmp    10030a <readline+0xb3>
        }
        else if (c >= ' ' && i < BUFSIZE - 1) {
  100292:	83 7d f0 1f          	cmpl   $0x1f,-0x10(%ebp)
  100296:	7e 28                	jle    1002c0 <readline+0x69>
  100298:	81 7d f4 fe 03 00 00 	cmpl   $0x3fe,-0xc(%ebp)
  10029f:	7f 1f                	jg     1002c0 <readline+0x69>
            cputchar(c);
  1002a1:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1002a4:	89 04 24             	mov    %eax,(%esp)
  1002a7:	e8 e2 00 00 00       	call   10038e <cputchar>
            buf[i ++] = c;
  1002ac:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1002af:	8d 50 01             	lea    0x1(%eax),%edx
  1002b2:	89 55 f4             	mov    %edx,-0xc(%ebp)
  1002b5:	8b 55 f0             	mov    -0x10(%ebp),%edx
  1002b8:	88 90 20 c0 11 00    	mov    %dl,0x11c020(%eax)
  1002be:	eb 45                	jmp    100305 <readline+0xae>
        }
        else if (c == '\b' && i > 0) {
  1002c0:	83 7d f0 08          	cmpl   $0x8,-0x10(%ebp)
  1002c4:	75 16                	jne    1002dc <readline+0x85>
  1002c6:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  1002ca:	7e 10                	jle    1002dc <readline+0x85>
            cputchar(c);
  1002cc:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1002cf:	89 04 24             	mov    %eax,(%esp)
  1002d2:	e8 b7 00 00 00       	call   10038e <cputchar>
            i --;
  1002d7:	ff 4d f4             	decl   -0xc(%ebp)
  1002da:	eb 29                	jmp    100305 <readline+0xae>
        }
        else if (c == '\n' || c == '\r') {
  1002dc:	83 7d f0 0a          	cmpl   $0xa,-0x10(%ebp)
  1002e0:	74 06                	je     1002e8 <readline+0x91>
  1002e2:	83 7d f0 0d          	cmpl   $0xd,-0x10(%ebp)
  1002e6:	75 95                	jne    10027d <readline+0x26>
            cputchar(c);
  1002e8:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1002eb:	89 04 24             	mov    %eax,(%esp)
  1002ee:	e8 9b 00 00 00       	call   10038e <cputchar>
            buf[i] = '\0';
  1002f3:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1002f6:	05 20 c0 11 00       	add    $0x11c020,%eax
  1002fb:	c6 00 00             	movb   $0x0,(%eax)
            return buf;
  1002fe:	b8 20 c0 11 00       	mov    $0x11c020,%eax
  100303:	eb 05                	jmp    10030a <readline+0xb3>
        c = getchar();
  100305:	e9 73 ff ff ff       	jmp    10027d <readline+0x26>
        }
    }
}
  10030a:	89 ec                	mov    %ebp,%esp
  10030c:	5d                   	pop    %ebp
  10030d:	c3                   	ret    

0010030e <cputch>:
/* *
 * cputch - writes a single character @c to stdout, and it will
 * increace the value of counter pointed by @cnt.
 * */
static void
cputch(int c, int *cnt) {
  10030e:	55                   	push   %ebp
  10030f:	89 e5                	mov    %esp,%ebp
  100311:	83 ec 18             	sub    $0x18,%esp
    cons_putc(c);
  100314:	8b 45 08             	mov    0x8(%ebp),%eax
  100317:	89 04 24             	mov    %eax,(%esp)
  10031a:	e8 70 13 00 00       	call   10168f <cons_putc>
    (*cnt) ++;
  10031f:	8b 45 0c             	mov    0xc(%ebp),%eax
  100322:	8b 00                	mov    (%eax),%eax
  100324:	8d 50 01             	lea    0x1(%eax),%edx
  100327:	8b 45 0c             	mov    0xc(%ebp),%eax
  10032a:	89 10                	mov    %edx,(%eax)
}
  10032c:	90                   	nop
  10032d:	89 ec                	mov    %ebp,%esp
  10032f:	5d                   	pop    %ebp
  100330:	c3                   	ret    

00100331 <vcprintf>:
 *
 * Call this function if you are already dealing with a va_list.
 * Or you probably want cprintf() instead.
 * */
int
vcprintf(const char *fmt, va_list ap) {
  100331:	55                   	push   %ebp
  100332:	89 e5                	mov    %esp,%ebp
  100334:	83 ec 28             	sub    $0x28,%esp
    int cnt = 0;
  100337:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    vprintfmt((void*)cputch, &cnt, fmt, ap);
  10033e:	8b 45 0c             	mov    0xc(%ebp),%eax
  100341:	89 44 24 0c          	mov    %eax,0xc(%esp)
  100345:	8b 45 08             	mov    0x8(%ebp),%eax
  100348:	89 44 24 08          	mov    %eax,0x8(%esp)
  10034c:	8d 45 f4             	lea    -0xc(%ebp),%eax
  10034f:	89 44 24 04          	mov    %eax,0x4(%esp)
  100353:	c7 04 24 0e 03 10 00 	movl   $0x10030e,(%esp)
  10035a:	e8 75 53 00 00       	call   1056d4 <vprintfmt>
    return cnt;
  10035f:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  100362:	89 ec                	mov    %ebp,%esp
  100364:	5d                   	pop    %ebp
  100365:	c3                   	ret    

00100366 <cprintf>:
 *
 * The return value is the number of characters which would be
 * written to stdout.
 * */
int
cprintf(const char *fmt, ...) {
  100366:	55                   	push   %ebp
  100367:	89 e5                	mov    %esp,%ebp
  100369:	83 ec 28             	sub    $0x28,%esp
    va_list ap;
    int cnt;
    va_start(ap, fmt);
  10036c:	8d 45 0c             	lea    0xc(%ebp),%eax
  10036f:	89 45 f0             	mov    %eax,-0x10(%ebp)
    cnt = vcprintf(fmt, ap);
  100372:	8b 45 f0             	mov    -0x10(%ebp),%eax
  100375:	89 44 24 04          	mov    %eax,0x4(%esp)
  100379:	8b 45 08             	mov    0x8(%ebp),%eax
  10037c:	89 04 24             	mov    %eax,(%esp)
  10037f:	e8 ad ff ff ff       	call   100331 <vcprintf>
  100384:	89 45 f4             	mov    %eax,-0xc(%ebp)
    va_end(ap);
    return cnt;
  100387:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  10038a:	89 ec                	mov    %ebp,%esp
  10038c:	5d                   	pop    %ebp
  10038d:	c3                   	ret    

0010038e <cputchar>:

/* cputchar - writes a single character to stdout */
void
cputchar(int c) {
  10038e:	55                   	push   %ebp
  10038f:	89 e5                	mov    %esp,%ebp
  100391:	83 ec 18             	sub    $0x18,%esp
    cons_putc(c);
  100394:	8b 45 08             	mov    0x8(%ebp),%eax
  100397:	89 04 24             	mov    %eax,(%esp)
  10039a:	e8 f0 12 00 00       	call   10168f <cons_putc>
}
  10039f:	90                   	nop
  1003a0:	89 ec                	mov    %ebp,%esp
  1003a2:	5d                   	pop    %ebp
  1003a3:	c3                   	ret    

001003a4 <cputs>:
/* *
 * cputs- writes the string pointed by @str to stdout and
 * appends a newline character.
 * */
int
cputs(const char *str) {
  1003a4:	55                   	push   %ebp
  1003a5:	89 e5                	mov    %esp,%ebp
  1003a7:	83 ec 28             	sub    $0x28,%esp
    int cnt = 0;
  1003aa:	c7 45 f0 00 00 00 00 	movl   $0x0,-0x10(%ebp)
    char c;
    while ((c = *str ++) != '\0') {
  1003b1:	eb 13                	jmp    1003c6 <cputs+0x22>
        cputch(c, &cnt);
  1003b3:	0f be 45 f7          	movsbl -0x9(%ebp),%eax
  1003b7:	8d 55 f0             	lea    -0x10(%ebp),%edx
  1003ba:	89 54 24 04          	mov    %edx,0x4(%esp)
  1003be:	89 04 24             	mov    %eax,(%esp)
  1003c1:	e8 48 ff ff ff       	call   10030e <cputch>
    while ((c = *str ++) != '\0') {
  1003c6:	8b 45 08             	mov    0x8(%ebp),%eax
  1003c9:	8d 50 01             	lea    0x1(%eax),%edx
  1003cc:	89 55 08             	mov    %edx,0x8(%ebp)
  1003cf:	0f b6 00             	movzbl (%eax),%eax
  1003d2:	88 45 f7             	mov    %al,-0x9(%ebp)
  1003d5:	80 7d f7 00          	cmpb   $0x0,-0x9(%ebp)
  1003d9:	75 d8                	jne    1003b3 <cputs+0xf>
    }
    cputch('\n', &cnt);
  1003db:	8d 45 f0             	lea    -0x10(%ebp),%eax
  1003de:	89 44 24 04          	mov    %eax,0x4(%esp)
  1003e2:	c7 04 24 0a 00 00 00 	movl   $0xa,(%esp)
  1003e9:	e8 20 ff ff ff       	call   10030e <cputch>
    return cnt;
  1003ee:	8b 45 f0             	mov    -0x10(%ebp),%eax
}
  1003f1:	89 ec                	mov    %ebp,%esp
  1003f3:	5d                   	pop    %ebp
  1003f4:	c3                   	ret    

001003f5 <getchar>:

/* getchar - reads a single non-zero character from stdin */
int
getchar(void) {
  1003f5:	55                   	push   %ebp
  1003f6:	89 e5                	mov    %esp,%ebp
  1003f8:	83 ec 18             	sub    $0x18,%esp
    int c;
    while ((c = cons_getc()) == 0)
  1003fb:	90                   	nop
  1003fc:	e8 cd 12 00 00       	call   1016ce <cons_getc>
  100401:	89 45 f4             	mov    %eax,-0xc(%ebp)
  100404:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  100408:	74 f2                	je     1003fc <getchar+0x7>
        /* do nothing */;
    return c;
  10040a:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  10040d:	89 ec                	mov    %ebp,%esp
  10040f:	5d                   	pop    %ebp
  100410:	c3                   	ret    

00100411 <stab_binsearch>:
 *      stab_binsearch(stabs, &left, &right, N_SO, 0xf0100184);
 * will exit setting left = 118, right = 554.
 * */
static void
stab_binsearch(const struct stab *stabs, int *region_left, int *region_right,
           int type, uintptr_t addr) {
  100411:	55                   	push   %ebp
  100412:	89 e5                	mov    %esp,%ebp
  100414:	83 ec 20             	sub    $0x20,%esp
    int l = *region_left, r = *region_right, any_matches = 0;
  100417:	8b 45 0c             	mov    0xc(%ebp),%eax
  10041a:	8b 00                	mov    (%eax),%eax
  10041c:	89 45 fc             	mov    %eax,-0x4(%ebp)
  10041f:	8b 45 10             	mov    0x10(%ebp),%eax
  100422:	8b 00                	mov    (%eax),%eax
  100424:	89 45 f8             	mov    %eax,-0x8(%ebp)
  100427:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)

    while (l <= r) {
  10042e:	e9 ca 00 00 00       	jmp    1004fd <stab_binsearch+0xec>
        int true_m = (l + r) / 2, m = true_m;
  100433:	8b 55 fc             	mov    -0x4(%ebp),%edx
  100436:	8b 45 f8             	mov    -0x8(%ebp),%eax
  100439:	01 d0                	add    %edx,%eax
  10043b:	89 c2                	mov    %eax,%edx
  10043d:	c1 ea 1f             	shr    $0x1f,%edx
  100440:	01 d0                	add    %edx,%eax
  100442:	d1 f8                	sar    %eax
  100444:	89 45 ec             	mov    %eax,-0x14(%ebp)
  100447:	8b 45 ec             	mov    -0x14(%ebp),%eax
  10044a:	89 45 f0             	mov    %eax,-0x10(%ebp)

        // search for earliest stab with right type
        while (m >= l && stabs[m].n_type != type) {
  10044d:	eb 03                	jmp    100452 <stab_binsearch+0x41>
            m --;
  10044f:	ff 4d f0             	decl   -0x10(%ebp)
        while (m >= l && stabs[m].n_type != type) {
  100452:	8b 45 f0             	mov    -0x10(%ebp),%eax
  100455:	3b 45 fc             	cmp    -0x4(%ebp),%eax
  100458:	7c 1f                	jl     100479 <stab_binsearch+0x68>
  10045a:	8b 55 f0             	mov    -0x10(%ebp),%edx
  10045d:	89 d0                	mov    %edx,%eax
  10045f:	01 c0                	add    %eax,%eax
  100461:	01 d0                	add    %edx,%eax
  100463:	c1 e0 02             	shl    $0x2,%eax
  100466:	89 c2                	mov    %eax,%edx
  100468:	8b 45 08             	mov    0x8(%ebp),%eax
  10046b:	01 d0                	add    %edx,%eax
  10046d:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  100471:	0f b6 c0             	movzbl %al,%eax
  100474:	39 45 14             	cmp    %eax,0x14(%ebp)
  100477:	75 d6                	jne    10044f <stab_binsearch+0x3e>
        }
        if (m < l) {    // no match in [l, m]
  100479:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10047c:	3b 45 fc             	cmp    -0x4(%ebp),%eax
  10047f:	7d 09                	jge    10048a <stab_binsearch+0x79>
            l = true_m + 1;
  100481:	8b 45 ec             	mov    -0x14(%ebp),%eax
  100484:	40                   	inc    %eax
  100485:	89 45 fc             	mov    %eax,-0x4(%ebp)
            continue;
  100488:	eb 73                	jmp    1004fd <stab_binsearch+0xec>
        }

        // actual binary search
        any_matches = 1;
  10048a:	c7 45 f4 01 00 00 00 	movl   $0x1,-0xc(%ebp)
        if (stabs[m].n_value < addr) {
  100491:	8b 55 f0             	mov    -0x10(%ebp),%edx
  100494:	89 d0                	mov    %edx,%eax
  100496:	01 c0                	add    %eax,%eax
  100498:	01 d0                	add    %edx,%eax
  10049a:	c1 e0 02             	shl    $0x2,%eax
  10049d:	89 c2                	mov    %eax,%edx
  10049f:	8b 45 08             	mov    0x8(%ebp),%eax
  1004a2:	01 d0                	add    %edx,%eax
  1004a4:	8b 40 08             	mov    0x8(%eax),%eax
  1004a7:	39 45 18             	cmp    %eax,0x18(%ebp)
  1004aa:	76 11                	jbe    1004bd <stab_binsearch+0xac>
            *region_left = m;
  1004ac:	8b 45 0c             	mov    0xc(%ebp),%eax
  1004af:	8b 55 f0             	mov    -0x10(%ebp),%edx
  1004b2:	89 10                	mov    %edx,(%eax)
            l = true_m + 1;
  1004b4:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1004b7:	40                   	inc    %eax
  1004b8:	89 45 fc             	mov    %eax,-0x4(%ebp)
  1004bb:	eb 40                	jmp    1004fd <stab_binsearch+0xec>
        } else if (stabs[m].n_value > addr) {
  1004bd:	8b 55 f0             	mov    -0x10(%ebp),%edx
  1004c0:	89 d0                	mov    %edx,%eax
  1004c2:	01 c0                	add    %eax,%eax
  1004c4:	01 d0                	add    %edx,%eax
  1004c6:	c1 e0 02             	shl    $0x2,%eax
  1004c9:	89 c2                	mov    %eax,%edx
  1004cb:	8b 45 08             	mov    0x8(%ebp),%eax
  1004ce:	01 d0                	add    %edx,%eax
  1004d0:	8b 40 08             	mov    0x8(%eax),%eax
  1004d3:	39 45 18             	cmp    %eax,0x18(%ebp)
  1004d6:	73 14                	jae    1004ec <stab_binsearch+0xdb>
            *region_right = m - 1;
  1004d8:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1004db:	8d 50 ff             	lea    -0x1(%eax),%edx
  1004de:	8b 45 10             	mov    0x10(%ebp),%eax
  1004e1:	89 10                	mov    %edx,(%eax)
            r = m - 1;
  1004e3:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1004e6:	48                   	dec    %eax
  1004e7:	89 45 f8             	mov    %eax,-0x8(%ebp)
  1004ea:	eb 11                	jmp    1004fd <stab_binsearch+0xec>
        } else {
            // exact match for 'addr', but continue loop to find
            // *region_right
            *region_left = m;
  1004ec:	8b 45 0c             	mov    0xc(%ebp),%eax
  1004ef:	8b 55 f0             	mov    -0x10(%ebp),%edx
  1004f2:	89 10                	mov    %edx,(%eax)
            l = m;
  1004f4:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1004f7:	89 45 fc             	mov    %eax,-0x4(%ebp)
            addr ++;
  1004fa:	ff 45 18             	incl   0x18(%ebp)
    while (l <= r) {
  1004fd:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100500:	3b 45 f8             	cmp    -0x8(%ebp),%eax
  100503:	0f 8e 2a ff ff ff    	jle    100433 <stab_binsearch+0x22>
        }
    }

    if (!any_matches) {
  100509:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  10050d:	75 0f                	jne    10051e <stab_binsearch+0x10d>
        *region_right = *region_left - 1;
  10050f:	8b 45 0c             	mov    0xc(%ebp),%eax
  100512:	8b 00                	mov    (%eax),%eax
  100514:	8d 50 ff             	lea    -0x1(%eax),%edx
  100517:	8b 45 10             	mov    0x10(%ebp),%eax
  10051a:	89 10                	mov    %edx,(%eax)
        l = *region_right;
        for (; l > *region_left && stabs[l].n_type != type; l --)
            /* do nothing */;
        *region_left = l;
    }
}
  10051c:	eb 3e                	jmp    10055c <stab_binsearch+0x14b>
        l = *region_right;
  10051e:	8b 45 10             	mov    0x10(%ebp),%eax
  100521:	8b 00                	mov    (%eax),%eax
  100523:	89 45 fc             	mov    %eax,-0x4(%ebp)
        for (; l > *region_left && stabs[l].n_type != type; l --)
  100526:	eb 03                	jmp    10052b <stab_binsearch+0x11a>
  100528:	ff 4d fc             	decl   -0x4(%ebp)
  10052b:	8b 45 0c             	mov    0xc(%ebp),%eax
  10052e:	8b 00                	mov    (%eax),%eax
  100530:	39 45 fc             	cmp    %eax,-0x4(%ebp)
  100533:	7e 1f                	jle    100554 <stab_binsearch+0x143>
  100535:	8b 55 fc             	mov    -0x4(%ebp),%edx
  100538:	89 d0                	mov    %edx,%eax
  10053a:	01 c0                	add    %eax,%eax
  10053c:	01 d0                	add    %edx,%eax
  10053e:	c1 e0 02             	shl    $0x2,%eax
  100541:	89 c2                	mov    %eax,%edx
  100543:	8b 45 08             	mov    0x8(%ebp),%eax
  100546:	01 d0                	add    %edx,%eax
  100548:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  10054c:	0f b6 c0             	movzbl %al,%eax
  10054f:	39 45 14             	cmp    %eax,0x14(%ebp)
  100552:	75 d4                	jne    100528 <stab_binsearch+0x117>
        *region_left = l;
  100554:	8b 45 0c             	mov    0xc(%ebp),%eax
  100557:	8b 55 fc             	mov    -0x4(%ebp),%edx
  10055a:	89 10                	mov    %edx,(%eax)
}
  10055c:	90                   	nop
  10055d:	89 ec                	mov    %ebp,%esp
  10055f:	5d                   	pop    %ebp
  100560:	c3                   	ret    

00100561 <debuginfo_eip>:
 * the specified instruction address, @addr.  Returns 0 if information
 * was found, and negative if not.  But even if it returns negative it
 * has stored some information into '*info'.
 * */
int
debuginfo_eip(uintptr_t addr, struct eipdebuginfo *info) {
  100561:	55                   	push   %ebp
  100562:	89 e5                	mov    %esp,%ebp
  100564:	83 ec 58             	sub    $0x58,%esp
    const struct stab *stabs, *stab_end;
    const char *stabstr, *stabstr_end;

    info->eip_file = "<unknown>";
  100567:	8b 45 0c             	mov    0xc(%ebp),%eax
  10056a:	c7 00 ec 60 10 00    	movl   $0x1060ec,(%eax)
    info->eip_line = 0;
  100570:	8b 45 0c             	mov    0xc(%ebp),%eax
  100573:	c7 40 04 00 00 00 00 	movl   $0x0,0x4(%eax)
    info->eip_fn_name = "<unknown>";
  10057a:	8b 45 0c             	mov    0xc(%ebp),%eax
  10057d:	c7 40 08 ec 60 10 00 	movl   $0x1060ec,0x8(%eax)
    info->eip_fn_namelen = 9;
  100584:	8b 45 0c             	mov    0xc(%ebp),%eax
  100587:	c7 40 0c 09 00 00 00 	movl   $0x9,0xc(%eax)
    info->eip_fn_addr = addr;
  10058e:	8b 45 0c             	mov    0xc(%ebp),%eax
  100591:	8b 55 08             	mov    0x8(%ebp),%edx
  100594:	89 50 10             	mov    %edx,0x10(%eax)
    info->eip_fn_narg = 0;
  100597:	8b 45 0c             	mov    0xc(%ebp),%eax
  10059a:	c7 40 14 00 00 00 00 	movl   $0x0,0x14(%eax)

    stabs = __STAB_BEGIN__;
  1005a1:	c7 45 f4 78 73 10 00 	movl   $0x107378,-0xc(%ebp)
    stab_end = __STAB_END__;
  1005a8:	c7 45 f0 a8 2a 11 00 	movl   $0x112aa8,-0x10(%ebp)
    stabstr = __STABSTR_BEGIN__;
  1005af:	c7 45 ec a9 2a 11 00 	movl   $0x112aa9,-0x14(%ebp)
    stabstr_end = __STABSTR_END__;
  1005b6:	c7 45 e8 59 60 11 00 	movl   $0x116059,-0x18(%ebp)

    // String table validity checks
    if (stabstr_end <= stabstr || stabstr_end[-1] != 0) {
  1005bd:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1005c0:	3b 45 ec             	cmp    -0x14(%ebp),%eax
  1005c3:	76 0b                	jbe    1005d0 <debuginfo_eip+0x6f>
  1005c5:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1005c8:	48                   	dec    %eax
  1005c9:	0f b6 00             	movzbl (%eax),%eax
  1005cc:	84 c0                	test   %al,%al
  1005ce:	74 0a                	je     1005da <debuginfo_eip+0x79>
        return -1;
  1005d0:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  1005d5:	e9 ab 02 00 00       	jmp    100885 <debuginfo_eip+0x324>
    // 'eip'.  First, we find the basic source file containing 'eip'.
    // Then, we look in that source file for the function.  Then we look
    // for the line number.

    // Search the entire set of stabs for the source file (type N_SO).
    int lfile = 0, rfile = (stab_end - stabs) - 1;
  1005da:	c7 45 e4 00 00 00 00 	movl   $0x0,-0x1c(%ebp)
  1005e1:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1005e4:	2b 45 f4             	sub    -0xc(%ebp),%eax
  1005e7:	c1 f8 02             	sar    $0x2,%eax
  1005ea:	69 c0 ab aa aa aa    	imul   $0xaaaaaaab,%eax,%eax
  1005f0:	48                   	dec    %eax
  1005f1:	89 45 e0             	mov    %eax,-0x20(%ebp)
    stab_binsearch(stabs, &lfile, &rfile, N_SO, addr);
  1005f4:	8b 45 08             	mov    0x8(%ebp),%eax
  1005f7:	89 44 24 10          	mov    %eax,0x10(%esp)
  1005fb:	c7 44 24 0c 64 00 00 	movl   $0x64,0xc(%esp)
  100602:	00 
  100603:	8d 45 e0             	lea    -0x20(%ebp),%eax
  100606:	89 44 24 08          	mov    %eax,0x8(%esp)
  10060a:	8d 45 e4             	lea    -0x1c(%ebp),%eax
  10060d:	89 44 24 04          	mov    %eax,0x4(%esp)
  100611:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100614:	89 04 24             	mov    %eax,(%esp)
  100617:	e8 f5 fd ff ff       	call   100411 <stab_binsearch>
    if (lfile == 0)
  10061c:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  10061f:	85 c0                	test   %eax,%eax
  100621:	75 0a                	jne    10062d <debuginfo_eip+0xcc>
        return -1;
  100623:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  100628:	e9 58 02 00 00       	jmp    100885 <debuginfo_eip+0x324>

    // Search within that file's stabs for the function definition
    // (N_FUN).
    int lfun = lfile, rfun = rfile;
  10062d:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  100630:	89 45 dc             	mov    %eax,-0x24(%ebp)
  100633:	8b 45 e0             	mov    -0x20(%ebp),%eax
  100636:	89 45 d8             	mov    %eax,-0x28(%ebp)
    int lline, rline;
    stab_binsearch(stabs, &lfun, &rfun, N_FUN, addr);
  100639:	8b 45 08             	mov    0x8(%ebp),%eax
  10063c:	89 44 24 10          	mov    %eax,0x10(%esp)
  100640:	c7 44 24 0c 24 00 00 	movl   $0x24,0xc(%esp)
  100647:	00 
  100648:	8d 45 d8             	lea    -0x28(%ebp),%eax
  10064b:	89 44 24 08          	mov    %eax,0x8(%esp)
  10064f:	8d 45 dc             	lea    -0x24(%ebp),%eax
  100652:	89 44 24 04          	mov    %eax,0x4(%esp)
  100656:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100659:	89 04 24             	mov    %eax,(%esp)
  10065c:	e8 b0 fd ff ff       	call   100411 <stab_binsearch>

    if (lfun <= rfun) {
  100661:	8b 55 dc             	mov    -0x24(%ebp),%edx
  100664:	8b 45 d8             	mov    -0x28(%ebp),%eax
  100667:	39 c2                	cmp    %eax,%edx
  100669:	7f 78                	jg     1006e3 <debuginfo_eip+0x182>
        // stabs[lfun] points to the function name
        // in the string table, but check bounds just in case.
        if (stabs[lfun].n_strx < stabstr_end - stabstr) {
  10066b:	8b 45 dc             	mov    -0x24(%ebp),%eax
  10066e:	89 c2                	mov    %eax,%edx
  100670:	89 d0                	mov    %edx,%eax
  100672:	01 c0                	add    %eax,%eax
  100674:	01 d0                	add    %edx,%eax
  100676:	c1 e0 02             	shl    $0x2,%eax
  100679:	89 c2                	mov    %eax,%edx
  10067b:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10067e:	01 d0                	add    %edx,%eax
  100680:	8b 10                	mov    (%eax),%edx
  100682:	8b 45 e8             	mov    -0x18(%ebp),%eax
  100685:	2b 45 ec             	sub    -0x14(%ebp),%eax
  100688:	39 c2                	cmp    %eax,%edx
  10068a:	73 22                	jae    1006ae <debuginfo_eip+0x14d>
            info->eip_fn_name = stabstr + stabs[lfun].n_strx;
  10068c:	8b 45 dc             	mov    -0x24(%ebp),%eax
  10068f:	89 c2                	mov    %eax,%edx
  100691:	89 d0                	mov    %edx,%eax
  100693:	01 c0                	add    %eax,%eax
  100695:	01 d0                	add    %edx,%eax
  100697:	c1 e0 02             	shl    $0x2,%eax
  10069a:	89 c2                	mov    %eax,%edx
  10069c:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10069f:	01 d0                	add    %edx,%eax
  1006a1:	8b 10                	mov    (%eax),%edx
  1006a3:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1006a6:	01 c2                	add    %eax,%edx
  1006a8:	8b 45 0c             	mov    0xc(%ebp),%eax
  1006ab:	89 50 08             	mov    %edx,0x8(%eax)
        }
        info->eip_fn_addr = stabs[lfun].n_value;
  1006ae:	8b 45 dc             	mov    -0x24(%ebp),%eax
  1006b1:	89 c2                	mov    %eax,%edx
  1006b3:	89 d0                	mov    %edx,%eax
  1006b5:	01 c0                	add    %eax,%eax
  1006b7:	01 d0                	add    %edx,%eax
  1006b9:	c1 e0 02             	shl    $0x2,%eax
  1006bc:	89 c2                	mov    %eax,%edx
  1006be:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1006c1:	01 d0                	add    %edx,%eax
  1006c3:	8b 50 08             	mov    0x8(%eax),%edx
  1006c6:	8b 45 0c             	mov    0xc(%ebp),%eax
  1006c9:	89 50 10             	mov    %edx,0x10(%eax)
        addr -= info->eip_fn_addr;
  1006cc:	8b 45 0c             	mov    0xc(%ebp),%eax
  1006cf:	8b 40 10             	mov    0x10(%eax),%eax
  1006d2:	29 45 08             	sub    %eax,0x8(%ebp)
        // Search within the function definition for the line number.
        lline = lfun;
  1006d5:	8b 45 dc             	mov    -0x24(%ebp),%eax
  1006d8:	89 45 d4             	mov    %eax,-0x2c(%ebp)
        rline = rfun;
  1006db:	8b 45 d8             	mov    -0x28(%ebp),%eax
  1006de:	89 45 d0             	mov    %eax,-0x30(%ebp)
  1006e1:	eb 15                	jmp    1006f8 <debuginfo_eip+0x197>
    } else {
        // Couldn't find function stab!  Maybe we're in an assembly
        // file.  Search the whole file for the line number.
        info->eip_fn_addr = addr;
  1006e3:	8b 45 0c             	mov    0xc(%ebp),%eax
  1006e6:	8b 55 08             	mov    0x8(%ebp),%edx
  1006e9:	89 50 10             	mov    %edx,0x10(%eax)
        lline = lfile;
  1006ec:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1006ef:	89 45 d4             	mov    %eax,-0x2c(%ebp)
        rline = rfile;
  1006f2:	8b 45 e0             	mov    -0x20(%ebp),%eax
  1006f5:	89 45 d0             	mov    %eax,-0x30(%ebp)
    }
    info->eip_fn_namelen = strfind(info->eip_fn_name, ':') - info->eip_fn_name;
  1006f8:	8b 45 0c             	mov    0xc(%ebp),%eax
  1006fb:	8b 40 08             	mov    0x8(%eax),%eax
  1006fe:	c7 44 24 04 3a 00 00 	movl   $0x3a,0x4(%esp)
  100705:	00 
  100706:	89 04 24             	mov    %eax,(%esp)
  100709:	e8 13 56 00 00       	call   105d21 <strfind>
  10070e:	8b 55 0c             	mov    0xc(%ebp),%edx
  100711:	8b 4a 08             	mov    0x8(%edx),%ecx
  100714:	29 c8                	sub    %ecx,%eax
  100716:	89 c2                	mov    %eax,%edx
  100718:	8b 45 0c             	mov    0xc(%ebp),%eax
  10071b:	89 50 0c             	mov    %edx,0xc(%eax)

    // Search within [lline, rline] for the line number stab.
    // If found, set info->eip_line to the right line number.
    // If not found, return -1.
    stab_binsearch(stabs, &lline, &rline, N_SLINE, addr);
  10071e:	8b 45 08             	mov    0x8(%ebp),%eax
  100721:	89 44 24 10          	mov    %eax,0x10(%esp)
  100725:	c7 44 24 0c 44 00 00 	movl   $0x44,0xc(%esp)
  10072c:	00 
  10072d:	8d 45 d0             	lea    -0x30(%ebp),%eax
  100730:	89 44 24 08          	mov    %eax,0x8(%esp)
  100734:	8d 45 d4             	lea    -0x2c(%ebp),%eax
  100737:	89 44 24 04          	mov    %eax,0x4(%esp)
  10073b:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10073e:	89 04 24             	mov    %eax,(%esp)
  100741:	e8 cb fc ff ff       	call   100411 <stab_binsearch>
    if (lline <= rline) {
  100746:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  100749:	8b 45 d0             	mov    -0x30(%ebp),%eax
  10074c:	39 c2                	cmp    %eax,%edx
  10074e:	7f 23                	jg     100773 <debuginfo_eip+0x212>
        info->eip_line = stabs[rline].n_desc;
  100750:	8b 45 d0             	mov    -0x30(%ebp),%eax
  100753:	89 c2                	mov    %eax,%edx
  100755:	89 d0                	mov    %edx,%eax
  100757:	01 c0                	add    %eax,%eax
  100759:	01 d0                	add    %edx,%eax
  10075b:	c1 e0 02             	shl    $0x2,%eax
  10075e:	89 c2                	mov    %eax,%edx
  100760:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100763:	01 d0                	add    %edx,%eax
  100765:	0f b7 40 06          	movzwl 0x6(%eax),%eax
  100769:	89 c2                	mov    %eax,%edx
  10076b:	8b 45 0c             	mov    0xc(%ebp),%eax
  10076e:	89 50 04             	mov    %edx,0x4(%eax)

    // Search backwards from the line number for the relevant filename stab.
    // We can't just use the "lfile" stab because inlined functions
    // can interpolate code from a different file!
    // Such included source files use the N_SOL stab type.
    while (lline >= lfile
  100771:	eb 11                	jmp    100784 <debuginfo_eip+0x223>
        return -1;
  100773:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  100778:	e9 08 01 00 00       	jmp    100885 <debuginfo_eip+0x324>
           && stabs[lline].n_type != N_SOL
           && (stabs[lline].n_type != N_SO || !stabs[lline].n_value)) {
        lline --;
  10077d:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  100780:	48                   	dec    %eax
  100781:	89 45 d4             	mov    %eax,-0x2c(%ebp)
    while (lline >= lfile
  100784:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  100787:	8b 45 e4             	mov    -0x1c(%ebp),%eax
           && (stabs[lline].n_type != N_SO || !stabs[lline].n_value)) {
  10078a:	39 c2                	cmp    %eax,%edx
  10078c:	7c 56                	jl     1007e4 <debuginfo_eip+0x283>
           && stabs[lline].n_type != N_SOL
  10078e:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  100791:	89 c2                	mov    %eax,%edx
  100793:	89 d0                	mov    %edx,%eax
  100795:	01 c0                	add    %eax,%eax
  100797:	01 d0                	add    %edx,%eax
  100799:	c1 e0 02             	shl    $0x2,%eax
  10079c:	89 c2                	mov    %eax,%edx
  10079e:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1007a1:	01 d0                	add    %edx,%eax
  1007a3:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  1007a7:	3c 84                	cmp    $0x84,%al
  1007a9:	74 39                	je     1007e4 <debuginfo_eip+0x283>
           && (stabs[lline].n_type != N_SO || !stabs[lline].n_value)) {
  1007ab:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  1007ae:	89 c2                	mov    %eax,%edx
  1007b0:	89 d0                	mov    %edx,%eax
  1007b2:	01 c0                	add    %eax,%eax
  1007b4:	01 d0                	add    %edx,%eax
  1007b6:	c1 e0 02             	shl    $0x2,%eax
  1007b9:	89 c2                	mov    %eax,%edx
  1007bb:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1007be:	01 d0                	add    %edx,%eax
  1007c0:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  1007c4:	3c 64                	cmp    $0x64,%al
  1007c6:	75 b5                	jne    10077d <debuginfo_eip+0x21c>
  1007c8:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  1007cb:	89 c2                	mov    %eax,%edx
  1007cd:	89 d0                	mov    %edx,%eax
  1007cf:	01 c0                	add    %eax,%eax
  1007d1:	01 d0                	add    %edx,%eax
  1007d3:	c1 e0 02             	shl    $0x2,%eax
  1007d6:	89 c2                	mov    %eax,%edx
  1007d8:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1007db:	01 d0                	add    %edx,%eax
  1007dd:	8b 40 08             	mov    0x8(%eax),%eax
  1007e0:	85 c0                	test   %eax,%eax
  1007e2:	74 99                	je     10077d <debuginfo_eip+0x21c>
    }
    if (lline >= lfile && stabs[lline].n_strx < stabstr_end - stabstr) {
  1007e4:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  1007e7:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1007ea:	39 c2                	cmp    %eax,%edx
  1007ec:	7c 42                	jl     100830 <debuginfo_eip+0x2cf>
  1007ee:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  1007f1:	89 c2                	mov    %eax,%edx
  1007f3:	89 d0                	mov    %edx,%eax
  1007f5:	01 c0                	add    %eax,%eax
  1007f7:	01 d0                	add    %edx,%eax
  1007f9:	c1 e0 02             	shl    $0x2,%eax
  1007fc:	89 c2                	mov    %eax,%edx
  1007fe:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100801:	01 d0                	add    %edx,%eax
  100803:	8b 10                	mov    (%eax),%edx
  100805:	8b 45 e8             	mov    -0x18(%ebp),%eax
  100808:	2b 45 ec             	sub    -0x14(%ebp),%eax
  10080b:	39 c2                	cmp    %eax,%edx
  10080d:	73 21                	jae    100830 <debuginfo_eip+0x2cf>
        info->eip_file = stabstr + stabs[lline].n_strx;
  10080f:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  100812:	89 c2                	mov    %eax,%edx
  100814:	89 d0                	mov    %edx,%eax
  100816:	01 c0                	add    %eax,%eax
  100818:	01 d0                	add    %edx,%eax
  10081a:	c1 e0 02             	shl    $0x2,%eax
  10081d:	89 c2                	mov    %eax,%edx
  10081f:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100822:	01 d0                	add    %edx,%eax
  100824:	8b 10                	mov    (%eax),%edx
  100826:	8b 45 ec             	mov    -0x14(%ebp),%eax
  100829:	01 c2                	add    %eax,%edx
  10082b:	8b 45 0c             	mov    0xc(%ebp),%eax
  10082e:	89 10                	mov    %edx,(%eax)
    }

    // Set eip_fn_narg to the number of arguments taken by the function,
    // or 0 if there was no containing function.
    if (lfun < rfun) {
  100830:	8b 55 dc             	mov    -0x24(%ebp),%edx
  100833:	8b 45 d8             	mov    -0x28(%ebp),%eax
  100836:	39 c2                	cmp    %eax,%edx
  100838:	7d 46                	jge    100880 <debuginfo_eip+0x31f>
        for (lline = lfun + 1;
  10083a:	8b 45 dc             	mov    -0x24(%ebp),%eax
  10083d:	40                   	inc    %eax
  10083e:	89 45 d4             	mov    %eax,-0x2c(%ebp)
  100841:	eb 16                	jmp    100859 <debuginfo_eip+0x2f8>
             lline < rfun && stabs[lline].n_type == N_PSYM;
             lline ++) {
            info->eip_fn_narg ++;
  100843:	8b 45 0c             	mov    0xc(%ebp),%eax
  100846:	8b 40 14             	mov    0x14(%eax),%eax
  100849:	8d 50 01             	lea    0x1(%eax),%edx
  10084c:	8b 45 0c             	mov    0xc(%ebp),%eax
  10084f:	89 50 14             	mov    %edx,0x14(%eax)
             lline ++) {
  100852:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  100855:	40                   	inc    %eax
  100856:	89 45 d4             	mov    %eax,-0x2c(%ebp)
             lline < rfun && stabs[lline].n_type == N_PSYM;
  100859:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  10085c:	8b 45 d8             	mov    -0x28(%ebp),%eax
  10085f:	39 c2                	cmp    %eax,%edx
  100861:	7d 1d                	jge    100880 <debuginfo_eip+0x31f>
  100863:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  100866:	89 c2                	mov    %eax,%edx
  100868:	89 d0                	mov    %edx,%eax
  10086a:	01 c0                	add    %eax,%eax
  10086c:	01 d0                	add    %edx,%eax
  10086e:	c1 e0 02             	shl    $0x2,%eax
  100871:	89 c2                	mov    %eax,%edx
  100873:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100876:	01 d0                	add    %edx,%eax
  100878:	0f b6 40 04          	movzbl 0x4(%eax),%eax
  10087c:	3c a0                	cmp    $0xa0,%al
  10087e:	74 c3                	je     100843 <debuginfo_eip+0x2e2>
        }
    }
    return 0;
  100880:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100885:	89 ec                	mov    %ebp,%esp
  100887:	5d                   	pop    %ebp
  100888:	c3                   	ret    

00100889 <print_kerninfo>:
 * print_kerninfo - print the information about kernel, including the location
 * of kernel entry, the start addresses of data and text segements, the start
 * address of free memory and how many memory that kernel has used.
 * */
void
print_kerninfo(void) {
  100889:	55                   	push   %ebp
  10088a:	89 e5                	mov    %esp,%ebp
  10088c:	83 ec 18             	sub    $0x18,%esp
    extern char etext[], edata[], end[], kern_init[];
    cprintf("Special kernel symbols:\n");
  10088f:	c7 04 24 f6 60 10 00 	movl   $0x1060f6,(%esp)
  100896:	e8 cb fa ff ff       	call   100366 <cprintf>
    cprintf("  entry  0x%08x (phys)\n", kern_init);
  10089b:	c7 44 24 04 36 00 10 	movl   $0x100036,0x4(%esp)
  1008a2:	00 
  1008a3:	c7 04 24 0f 61 10 00 	movl   $0x10610f,(%esp)
  1008aa:	e8 b7 fa ff ff       	call   100366 <cprintf>
    cprintf("  etext  0x%08x (phys)\n", etext);
  1008af:	c7 44 24 04 35 60 10 	movl   $0x106035,0x4(%esp)
  1008b6:	00 
  1008b7:	c7 04 24 27 61 10 00 	movl   $0x106127,(%esp)
  1008be:	e8 a3 fa ff ff       	call   100366 <cprintf>
    cprintf("  edata  0x%08x (phys)\n", edata);
  1008c3:	c7 44 24 04 36 9a 11 	movl   $0x119a36,0x4(%esp)
  1008ca:	00 
  1008cb:	c7 04 24 3f 61 10 00 	movl   $0x10613f,(%esp)
  1008d2:	e8 8f fa ff ff       	call   100366 <cprintf>
    cprintf("  end    0x%08x (phys)\n", end);
  1008d7:	c7 44 24 04 4c cf 11 	movl   $0x11cf4c,0x4(%esp)
  1008de:	00 
  1008df:	c7 04 24 57 61 10 00 	movl   $0x106157,(%esp)
  1008e6:	e8 7b fa ff ff       	call   100366 <cprintf>
    cprintf("Kernel executable memory footprint: %dKB\n", (end - kern_init + 1023)/1024);
  1008eb:	b8 4c cf 11 00       	mov    $0x11cf4c,%eax
  1008f0:	2d 36 00 10 00       	sub    $0x100036,%eax
  1008f5:	05 ff 03 00 00       	add    $0x3ff,%eax
  1008fa:	8d 90 ff 03 00 00    	lea    0x3ff(%eax),%edx
  100900:	85 c0                	test   %eax,%eax
  100902:	0f 48 c2             	cmovs  %edx,%eax
  100905:	c1 f8 0a             	sar    $0xa,%eax
  100908:	89 44 24 04          	mov    %eax,0x4(%esp)
  10090c:	c7 04 24 70 61 10 00 	movl   $0x106170,(%esp)
  100913:	e8 4e fa ff ff       	call   100366 <cprintf>
}
  100918:	90                   	nop
  100919:	89 ec                	mov    %ebp,%esp
  10091b:	5d                   	pop    %ebp
  10091c:	c3                   	ret    

0010091d <print_debuginfo>:
/* *
 * print_debuginfo - read and print the stat information for the address @eip,
 * and info.eip_fn_addr should be the first address of the related function.
 * */
void
print_debuginfo(uintptr_t eip) {
  10091d:	55                   	push   %ebp
  10091e:	89 e5                	mov    %esp,%ebp
  100920:	81 ec 48 01 00 00    	sub    $0x148,%esp
    struct eipdebuginfo info;
    if (debuginfo_eip(eip, &info) != 0) {
  100926:	8d 45 dc             	lea    -0x24(%ebp),%eax
  100929:	89 44 24 04          	mov    %eax,0x4(%esp)
  10092d:	8b 45 08             	mov    0x8(%ebp),%eax
  100930:	89 04 24             	mov    %eax,(%esp)
  100933:	e8 29 fc ff ff       	call   100561 <debuginfo_eip>
  100938:	85 c0                	test   %eax,%eax
  10093a:	74 15                	je     100951 <print_debuginfo+0x34>
        cprintf("    <unknow>: -- 0x%08x --\n", eip);
  10093c:	8b 45 08             	mov    0x8(%ebp),%eax
  10093f:	89 44 24 04          	mov    %eax,0x4(%esp)
  100943:	c7 04 24 9a 61 10 00 	movl   $0x10619a,(%esp)
  10094a:	e8 17 fa ff ff       	call   100366 <cprintf>
        }
        fnname[j] = '\0';
        cprintf("    %s:%d: %s+%d\n", info.eip_file, info.eip_line,
                fnname, eip - info.eip_fn_addr);
    }
}
  10094f:	eb 6c                	jmp    1009bd <print_debuginfo+0xa0>
        for (j = 0; j < info.eip_fn_namelen; j ++) {
  100951:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  100958:	eb 1b                	jmp    100975 <print_debuginfo+0x58>
            fnname[j] = info.eip_fn_name[j];
  10095a:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  10095d:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100960:	01 d0                	add    %edx,%eax
  100962:	0f b6 10             	movzbl (%eax),%edx
  100965:	8d 8d dc fe ff ff    	lea    -0x124(%ebp),%ecx
  10096b:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10096e:	01 c8                	add    %ecx,%eax
  100970:	88 10                	mov    %dl,(%eax)
        for (j = 0; j < info.eip_fn_namelen; j ++) {
  100972:	ff 45 f4             	incl   -0xc(%ebp)
  100975:	8b 45 e8             	mov    -0x18(%ebp),%eax
  100978:	39 45 f4             	cmp    %eax,-0xc(%ebp)
  10097b:	7c dd                	jl     10095a <print_debuginfo+0x3d>
        fnname[j] = '\0';
  10097d:	8d 95 dc fe ff ff    	lea    -0x124(%ebp),%edx
  100983:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100986:	01 d0                	add    %edx,%eax
  100988:	c6 00 00             	movb   $0x0,(%eax)
                fnname, eip - info.eip_fn_addr);
  10098b:	8b 55 ec             	mov    -0x14(%ebp),%edx
        cprintf("    %s:%d: %s+%d\n", info.eip_file, info.eip_line,
  10098e:	8b 45 08             	mov    0x8(%ebp),%eax
  100991:	29 d0                	sub    %edx,%eax
  100993:	89 c1                	mov    %eax,%ecx
  100995:	8b 55 e0             	mov    -0x20(%ebp),%edx
  100998:	8b 45 dc             	mov    -0x24(%ebp),%eax
  10099b:	89 4c 24 10          	mov    %ecx,0x10(%esp)
  10099f:	8d 8d dc fe ff ff    	lea    -0x124(%ebp),%ecx
  1009a5:	89 4c 24 0c          	mov    %ecx,0xc(%esp)
  1009a9:	89 54 24 08          	mov    %edx,0x8(%esp)
  1009ad:	89 44 24 04          	mov    %eax,0x4(%esp)
  1009b1:	c7 04 24 b6 61 10 00 	movl   $0x1061b6,(%esp)
  1009b8:	e8 a9 f9 ff ff       	call   100366 <cprintf>
}
  1009bd:	90                   	nop
  1009be:	89 ec                	mov    %ebp,%esp
  1009c0:	5d                   	pop    %ebp
  1009c1:	c3                   	ret    

001009c2 <read_eip>:

static __noinline uint32_t
read_eip(void) {
  1009c2:	55                   	push   %ebp
  1009c3:	89 e5                	mov    %esp,%ebp
  1009c5:	83 ec 10             	sub    $0x10,%esp
    uint32_t eip;
    asm volatile("movl 4(%%ebp), %0" : "=r" (eip));
  1009c8:	8b 45 04             	mov    0x4(%ebp),%eax
  1009cb:	89 45 fc             	mov    %eax,-0x4(%ebp)
    return eip;
  1009ce:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  1009d1:	89 ec                	mov    %ebp,%esp
  1009d3:	5d                   	pop    %ebp
  1009d4:	c3                   	ret    

001009d5 <print_stackframe>:
 *
 * Note that, the length of ebp-chain is limited. In boot/bootasm.S, before jumping
 * to the kernel entry, the value of ebp has been set to zero, that's the boundary.
 * */
void
print_stackframe(void) {
  1009d5:	55                   	push   %ebp
  1009d6:	89 e5                	mov    %esp,%ebp
  1009d8:	83 ec 48             	sub    $0x48,%esp
}

static inline uint32_t
read_ebp(void) {
    uint32_t ebp;
    asm volatile ("movl %%ebp, %0" : "=r" (ebp));
  1009db:	89 e8                	mov    %ebp,%eax
  1009dd:	89 45 e4             	mov    %eax,-0x1c(%ebp)
    return ebp;
  1009e0:	8b 45 e4             	mov    -0x1c(%ebp),%eax
      *    (3.4) call print_debuginfo(eip-1) to print the C calling function name and line number, etc.
      *    (3.5) popup a calling stackframe
      *           NOTICE: the calling funciton's return addr eip  = ss:[ebp+4]
      *                   the calling funciton's ebp = ss:[ebp]
      */
    uint32_t ebp = read_ebp(), eip = read_eip();
  1009e3:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1009e6:	e8 d7 ff ff ff       	call   1009c2 <read_eip>
  1009eb:	89 45 f0             	mov    %eax,-0x10(%ebp)
    for (int i = 0; i < STACKFRAME_DEPTH; i++){
  1009ee:	c7 45 ec 00 00 00 00 	movl   $0x0,-0x14(%ebp)
  1009f5:	e9 8c 00 00 00       	jmp    100a86 <print_stackframe+0xb1>
        cprintf("ebp:0x%08x eip:0x%08x args: ", ebp, eip);
  1009fa:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1009fd:	89 44 24 08          	mov    %eax,0x8(%esp)
  100a01:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100a04:	89 44 24 04          	mov    %eax,0x4(%esp)
  100a08:	c7 04 24 c8 61 10 00 	movl   $0x1061c8,(%esp)
  100a0f:	e8 52 f9 ff ff       	call   100366 <cprintf>
        uint32_t arg[4];
        for(int j = 0; j < 4; j++){
  100a14:	c7 45 e8 00 00 00 00 	movl   $0x0,-0x18(%ebp)
  100a1b:	eb 35                	jmp    100a52 <print_stackframe+0x7d>
            arg[j] = *((uint32_t *)ebp + 2 + j);
  100a1d:	8b 45 e8             	mov    -0x18(%ebp),%eax
  100a20:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx
  100a27:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100a2a:	01 d0                	add    %edx,%eax
  100a2c:	83 c0 08             	add    $0x8,%eax
  100a2f:	8b 10                	mov    (%eax),%edx
  100a31:	8b 45 e8             	mov    -0x18(%ebp),%eax
  100a34:	89 54 85 d4          	mov    %edx,-0x2c(%ebp,%eax,4)
            cprintf("0x%08x ", arg[j]);
  100a38:	8b 45 e8             	mov    -0x18(%ebp),%eax
  100a3b:	8b 44 85 d4          	mov    -0x2c(%ebp,%eax,4),%eax
  100a3f:	89 44 24 04          	mov    %eax,0x4(%esp)
  100a43:	c7 04 24 e5 61 10 00 	movl   $0x1061e5,(%esp)
  100a4a:	e8 17 f9 ff ff       	call   100366 <cprintf>
        for(int j = 0; j < 4; j++){
  100a4f:	ff 45 e8             	incl   -0x18(%ebp)
  100a52:	83 7d e8 03          	cmpl   $0x3,-0x18(%ebp)
  100a56:	7e c5                	jle    100a1d <print_stackframe+0x48>
        }
        cprintf("\n");
  100a58:	c7 04 24 ed 61 10 00 	movl   $0x1061ed,(%esp)
  100a5f:	e8 02 f9 ff ff       	call   100366 <cprintf>
        print_debuginfo(eip - 1);
  100a64:	8b 45 f0             	mov    -0x10(%ebp),%eax
  100a67:	48                   	dec    %eax
  100a68:	89 04 24             	mov    %eax,(%esp)
  100a6b:	e8 ad fe ff ff       	call   10091d <print_debuginfo>
        eip = *((uint32_t *)ebp + 1);
  100a70:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100a73:	83 c0 04             	add    $0x4,%eax
  100a76:	8b 00                	mov    (%eax),%eax
  100a78:	89 45 f0             	mov    %eax,-0x10(%ebp)
        ebp = *((uint32_t *)ebp);
  100a7b:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100a7e:	8b 00                	mov    (%eax),%eax
  100a80:	89 45 f4             	mov    %eax,-0xc(%ebp)
    for (int i = 0; i < STACKFRAME_DEPTH; i++){
  100a83:	ff 45 ec             	incl   -0x14(%ebp)
  100a86:	83 7d ec 13          	cmpl   $0x13,-0x14(%ebp)
  100a8a:	0f 8e 6a ff ff ff    	jle    1009fa <print_stackframe+0x25>
    }
}
  100a90:	90                   	nop
  100a91:	90                   	nop
  100a92:	89 ec                	mov    %ebp,%esp
  100a94:	5d                   	pop    %ebp
  100a95:	c3                   	ret    

00100a96 <parse>:
#define MAXARGS         16
#define WHITESPACE      " \t\n\r"

/* parse - parse the command buffer into whitespace-separated arguments */
static int
parse(char *buf, char **argv) {
  100a96:	55                   	push   %ebp
  100a97:	89 e5                	mov    %esp,%ebp
  100a99:	83 ec 28             	sub    $0x28,%esp
    int argc = 0;
  100a9c:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    while (1) {
        // find global whitespace
        while (*buf != '\0' && strchr(WHITESPACE, *buf) != NULL) {
  100aa3:	eb 0c                	jmp    100ab1 <parse+0x1b>
            *buf ++ = '\0';
  100aa5:	8b 45 08             	mov    0x8(%ebp),%eax
  100aa8:	8d 50 01             	lea    0x1(%eax),%edx
  100aab:	89 55 08             	mov    %edx,0x8(%ebp)
  100aae:	c6 00 00             	movb   $0x0,(%eax)
        while (*buf != '\0' && strchr(WHITESPACE, *buf) != NULL) {
  100ab1:	8b 45 08             	mov    0x8(%ebp),%eax
  100ab4:	0f b6 00             	movzbl (%eax),%eax
  100ab7:	84 c0                	test   %al,%al
  100ab9:	74 1d                	je     100ad8 <parse+0x42>
  100abb:	8b 45 08             	mov    0x8(%ebp),%eax
  100abe:	0f b6 00             	movzbl (%eax),%eax
  100ac1:	0f be c0             	movsbl %al,%eax
  100ac4:	89 44 24 04          	mov    %eax,0x4(%esp)
  100ac8:	c7 04 24 70 62 10 00 	movl   $0x106270,(%esp)
  100acf:	e8 19 52 00 00       	call   105ced <strchr>
  100ad4:	85 c0                	test   %eax,%eax
  100ad6:	75 cd                	jne    100aa5 <parse+0xf>
        }
        if (*buf == '\0') {
  100ad8:	8b 45 08             	mov    0x8(%ebp),%eax
  100adb:	0f b6 00             	movzbl (%eax),%eax
  100ade:	84 c0                	test   %al,%al
  100ae0:	74 65                	je     100b47 <parse+0xb1>
            break;
        }

        // save and scan past next arg
        if (argc == MAXARGS - 1) {
  100ae2:	83 7d f4 0f          	cmpl   $0xf,-0xc(%ebp)
  100ae6:	75 14                	jne    100afc <parse+0x66>
            cprintf("Too many arguments (max %d).\n", MAXARGS);
  100ae8:	c7 44 24 04 10 00 00 	movl   $0x10,0x4(%esp)
  100aef:	00 
  100af0:	c7 04 24 75 62 10 00 	movl   $0x106275,(%esp)
  100af7:	e8 6a f8 ff ff       	call   100366 <cprintf>
        }
        argv[argc ++] = buf;
  100afc:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100aff:	8d 50 01             	lea    0x1(%eax),%edx
  100b02:	89 55 f4             	mov    %edx,-0xc(%ebp)
  100b05:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx
  100b0c:	8b 45 0c             	mov    0xc(%ebp),%eax
  100b0f:	01 c2                	add    %eax,%edx
  100b11:	8b 45 08             	mov    0x8(%ebp),%eax
  100b14:	89 02                	mov    %eax,(%edx)
        while (*buf != '\0' && strchr(WHITESPACE, *buf) == NULL) {
  100b16:	eb 03                	jmp    100b1b <parse+0x85>
            buf ++;
  100b18:	ff 45 08             	incl   0x8(%ebp)
        while (*buf != '\0' && strchr(WHITESPACE, *buf) == NULL) {
  100b1b:	8b 45 08             	mov    0x8(%ebp),%eax
  100b1e:	0f b6 00             	movzbl (%eax),%eax
  100b21:	84 c0                	test   %al,%al
  100b23:	74 8c                	je     100ab1 <parse+0x1b>
  100b25:	8b 45 08             	mov    0x8(%ebp),%eax
  100b28:	0f b6 00             	movzbl (%eax),%eax
  100b2b:	0f be c0             	movsbl %al,%eax
  100b2e:	89 44 24 04          	mov    %eax,0x4(%esp)
  100b32:	c7 04 24 70 62 10 00 	movl   $0x106270,(%esp)
  100b39:	e8 af 51 00 00       	call   105ced <strchr>
  100b3e:	85 c0                	test   %eax,%eax
  100b40:	74 d6                	je     100b18 <parse+0x82>
        while (*buf != '\0' && strchr(WHITESPACE, *buf) != NULL) {
  100b42:	e9 6a ff ff ff       	jmp    100ab1 <parse+0x1b>
            break;
  100b47:	90                   	nop
        }
    }
    return argc;
  100b48:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  100b4b:	89 ec                	mov    %ebp,%esp
  100b4d:	5d                   	pop    %ebp
  100b4e:	c3                   	ret    

00100b4f <runcmd>:
/* *
 * runcmd - parse the input string, split it into separated arguments
 * and then lookup and invoke some related commands/
 * */
static int
runcmd(char *buf, struct trapframe *tf) {
  100b4f:	55                   	push   %ebp
  100b50:	89 e5                	mov    %esp,%ebp
  100b52:	83 ec 68             	sub    $0x68,%esp
  100b55:	89 5d fc             	mov    %ebx,-0x4(%ebp)
    char *argv[MAXARGS];
    int argc = parse(buf, argv);
  100b58:	8d 45 b0             	lea    -0x50(%ebp),%eax
  100b5b:	89 44 24 04          	mov    %eax,0x4(%esp)
  100b5f:	8b 45 08             	mov    0x8(%ebp),%eax
  100b62:	89 04 24             	mov    %eax,(%esp)
  100b65:	e8 2c ff ff ff       	call   100a96 <parse>
  100b6a:	89 45 f0             	mov    %eax,-0x10(%ebp)
    if (argc == 0) {
  100b6d:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  100b71:	75 0a                	jne    100b7d <runcmd+0x2e>
        return 0;
  100b73:	b8 00 00 00 00       	mov    $0x0,%eax
  100b78:	e9 83 00 00 00       	jmp    100c00 <runcmd+0xb1>
    }
    int i;
    for (i = 0; i < NCOMMANDS; i ++) {
  100b7d:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  100b84:	eb 5a                	jmp    100be0 <runcmd+0x91>
        if (strcmp(commands[i].name, argv[0]) == 0) {
  100b86:	8b 55 b0             	mov    -0x50(%ebp),%edx
  100b89:	8b 4d f4             	mov    -0xc(%ebp),%ecx
  100b8c:	89 c8                	mov    %ecx,%eax
  100b8e:	01 c0                	add    %eax,%eax
  100b90:	01 c8                	add    %ecx,%eax
  100b92:	c1 e0 02             	shl    $0x2,%eax
  100b95:	05 00 90 11 00       	add    $0x119000,%eax
  100b9a:	8b 00                	mov    (%eax),%eax
  100b9c:	89 54 24 04          	mov    %edx,0x4(%esp)
  100ba0:	89 04 24             	mov    %eax,(%esp)
  100ba3:	e8 a9 50 00 00       	call   105c51 <strcmp>
  100ba8:	85 c0                	test   %eax,%eax
  100baa:	75 31                	jne    100bdd <runcmd+0x8e>
            return commands[i].func(argc - 1, argv + 1, tf);
  100bac:	8b 55 f4             	mov    -0xc(%ebp),%edx
  100baf:	89 d0                	mov    %edx,%eax
  100bb1:	01 c0                	add    %eax,%eax
  100bb3:	01 d0                	add    %edx,%eax
  100bb5:	c1 e0 02             	shl    $0x2,%eax
  100bb8:	05 08 90 11 00       	add    $0x119008,%eax
  100bbd:	8b 10                	mov    (%eax),%edx
  100bbf:	8d 45 b0             	lea    -0x50(%ebp),%eax
  100bc2:	83 c0 04             	add    $0x4,%eax
  100bc5:	8b 4d f0             	mov    -0x10(%ebp),%ecx
  100bc8:	8d 59 ff             	lea    -0x1(%ecx),%ebx
  100bcb:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  100bce:	89 4c 24 08          	mov    %ecx,0x8(%esp)
  100bd2:	89 44 24 04          	mov    %eax,0x4(%esp)
  100bd6:	89 1c 24             	mov    %ebx,(%esp)
  100bd9:	ff d2                	call   *%edx
  100bdb:	eb 23                	jmp    100c00 <runcmd+0xb1>
    for (i = 0; i < NCOMMANDS; i ++) {
  100bdd:	ff 45 f4             	incl   -0xc(%ebp)
  100be0:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100be3:	83 f8 02             	cmp    $0x2,%eax
  100be6:	76 9e                	jbe    100b86 <runcmd+0x37>
        }
    }
    cprintf("Unknown command '%s'\n", argv[0]);
  100be8:	8b 45 b0             	mov    -0x50(%ebp),%eax
  100beb:	89 44 24 04          	mov    %eax,0x4(%esp)
  100bef:	c7 04 24 93 62 10 00 	movl   $0x106293,(%esp)
  100bf6:	e8 6b f7 ff ff       	call   100366 <cprintf>
    return 0;
  100bfb:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100c00:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  100c03:	89 ec                	mov    %ebp,%esp
  100c05:	5d                   	pop    %ebp
  100c06:	c3                   	ret    

00100c07 <kmonitor>:

/***** Implementations of basic kernel monitor commands *****/

void
kmonitor(struct trapframe *tf) {
  100c07:	55                   	push   %ebp
  100c08:	89 e5                	mov    %esp,%ebp
  100c0a:	83 ec 28             	sub    $0x28,%esp
    cprintf("Welcome to the kernel debug monitor!!\n");
  100c0d:	c7 04 24 ac 62 10 00 	movl   $0x1062ac,(%esp)
  100c14:	e8 4d f7 ff ff       	call   100366 <cprintf>
    cprintf("Type 'help' for a list of commands.\n");
  100c19:	c7 04 24 d4 62 10 00 	movl   $0x1062d4,(%esp)
  100c20:	e8 41 f7 ff ff       	call   100366 <cprintf>

    if (tf != NULL) {
  100c25:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  100c29:	74 0b                	je     100c36 <kmonitor+0x2f>
        print_trapframe(tf);
  100c2b:	8b 45 08             	mov    0x8(%ebp),%eax
  100c2e:	89 04 24             	mov    %eax,(%esp)
  100c31:	e8 cf 0e 00 00       	call   101b05 <print_trapframe>
    }

    char *buf;
    while (1) {
        if ((buf = readline("K> ")) != NULL) {
  100c36:	c7 04 24 f9 62 10 00 	movl   $0x1062f9,(%esp)
  100c3d:	e8 15 f6 ff ff       	call   100257 <readline>
  100c42:	89 45 f4             	mov    %eax,-0xc(%ebp)
  100c45:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  100c49:	74 eb                	je     100c36 <kmonitor+0x2f>
            if (runcmd(buf, tf) < 0) {
  100c4b:	8b 45 08             	mov    0x8(%ebp),%eax
  100c4e:	89 44 24 04          	mov    %eax,0x4(%esp)
  100c52:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100c55:	89 04 24             	mov    %eax,(%esp)
  100c58:	e8 f2 fe ff ff       	call   100b4f <runcmd>
  100c5d:	85 c0                	test   %eax,%eax
  100c5f:	78 02                	js     100c63 <kmonitor+0x5c>
        if ((buf = readline("K> ")) != NULL) {
  100c61:	eb d3                	jmp    100c36 <kmonitor+0x2f>
                break;
  100c63:	90                   	nop
            }
        }
    }
}
  100c64:	90                   	nop
  100c65:	89 ec                	mov    %ebp,%esp
  100c67:	5d                   	pop    %ebp
  100c68:	c3                   	ret    

00100c69 <mon_help>:

/* mon_help - print the information about mon_* functions */
int
mon_help(int argc, char **argv, struct trapframe *tf) {
  100c69:	55                   	push   %ebp
  100c6a:	89 e5                	mov    %esp,%ebp
  100c6c:	83 ec 28             	sub    $0x28,%esp
    int i;
    for (i = 0; i < NCOMMANDS; i ++) {
  100c6f:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  100c76:	eb 3d                	jmp    100cb5 <mon_help+0x4c>
        cprintf("%s - %s\n", commands[i].name, commands[i].desc);
  100c78:	8b 55 f4             	mov    -0xc(%ebp),%edx
  100c7b:	89 d0                	mov    %edx,%eax
  100c7d:	01 c0                	add    %eax,%eax
  100c7f:	01 d0                	add    %edx,%eax
  100c81:	c1 e0 02             	shl    $0x2,%eax
  100c84:	05 04 90 11 00       	add    $0x119004,%eax
  100c89:	8b 10                	mov    (%eax),%edx
  100c8b:	8b 4d f4             	mov    -0xc(%ebp),%ecx
  100c8e:	89 c8                	mov    %ecx,%eax
  100c90:	01 c0                	add    %eax,%eax
  100c92:	01 c8                	add    %ecx,%eax
  100c94:	c1 e0 02             	shl    $0x2,%eax
  100c97:	05 00 90 11 00       	add    $0x119000,%eax
  100c9c:	8b 00                	mov    (%eax),%eax
  100c9e:	89 54 24 08          	mov    %edx,0x8(%esp)
  100ca2:	89 44 24 04          	mov    %eax,0x4(%esp)
  100ca6:	c7 04 24 fd 62 10 00 	movl   $0x1062fd,(%esp)
  100cad:	e8 b4 f6 ff ff       	call   100366 <cprintf>
    for (i = 0; i < NCOMMANDS; i ++) {
  100cb2:	ff 45 f4             	incl   -0xc(%ebp)
  100cb5:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100cb8:	83 f8 02             	cmp    $0x2,%eax
  100cbb:	76 bb                	jbe    100c78 <mon_help+0xf>
    }
    return 0;
  100cbd:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100cc2:	89 ec                	mov    %ebp,%esp
  100cc4:	5d                   	pop    %ebp
  100cc5:	c3                   	ret    

00100cc6 <mon_kerninfo>:
/* *
 * mon_kerninfo - call print_kerninfo in kern/debug/kdebug.c to
 * print the memory occupancy in kernel.
 * */
int
mon_kerninfo(int argc, char **argv, struct trapframe *tf) {
  100cc6:	55                   	push   %ebp
  100cc7:	89 e5                	mov    %esp,%ebp
  100cc9:	83 ec 08             	sub    $0x8,%esp
    print_kerninfo();
  100ccc:	e8 b8 fb ff ff       	call   100889 <print_kerninfo>
    return 0;
  100cd1:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100cd6:	89 ec                	mov    %ebp,%esp
  100cd8:	5d                   	pop    %ebp
  100cd9:	c3                   	ret    

00100cda <mon_backtrace>:
/* *
 * mon_backtrace - call print_stackframe in kern/debug/kdebug.c to
 * print a backtrace of the stack.
 * */
int
mon_backtrace(int argc, char **argv, struct trapframe *tf) {
  100cda:	55                   	push   %ebp
  100cdb:	89 e5                	mov    %esp,%ebp
  100cdd:	83 ec 08             	sub    $0x8,%esp
    print_stackframe();
  100ce0:	e8 f0 fc ff ff       	call   1009d5 <print_stackframe>
    return 0;
  100ce5:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100cea:	89 ec                	mov    %ebp,%esp
  100cec:	5d                   	pop    %ebp
  100ced:	c3                   	ret    

00100cee <__panic>:
/* *
 * __panic - __panic is called on unresolvable fatal errors. it prints
 * "panic: 'message'", and then enters the kernel monitor.
 * */
void
__panic(const char *file, int line, const char *fmt, ...) {
  100cee:	55                   	push   %ebp
  100cef:	89 e5                	mov    %esp,%ebp
  100cf1:	83 ec 28             	sub    $0x28,%esp
    if (is_panic) {
  100cf4:	a1 20 c4 11 00       	mov    0x11c420,%eax
  100cf9:	85 c0                	test   %eax,%eax
  100cfb:	75 5b                	jne    100d58 <__panic+0x6a>
        goto panic_dead;
    }
    is_panic = 1;
  100cfd:	c7 05 20 c4 11 00 01 	movl   $0x1,0x11c420
  100d04:	00 00 00 

    // print the 'message'
    va_list ap;
    va_start(ap, fmt);
  100d07:	8d 45 14             	lea    0x14(%ebp),%eax
  100d0a:	89 45 f4             	mov    %eax,-0xc(%ebp)
    cprintf("kernel panic at %s:%d:\n    ", file, line);
  100d0d:	8b 45 0c             	mov    0xc(%ebp),%eax
  100d10:	89 44 24 08          	mov    %eax,0x8(%esp)
  100d14:	8b 45 08             	mov    0x8(%ebp),%eax
  100d17:	89 44 24 04          	mov    %eax,0x4(%esp)
  100d1b:	c7 04 24 06 63 10 00 	movl   $0x106306,(%esp)
  100d22:	e8 3f f6 ff ff       	call   100366 <cprintf>
    vcprintf(fmt, ap);
  100d27:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100d2a:	89 44 24 04          	mov    %eax,0x4(%esp)
  100d2e:	8b 45 10             	mov    0x10(%ebp),%eax
  100d31:	89 04 24             	mov    %eax,(%esp)
  100d34:	e8 f8 f5 ff ff       	call   100331 <vcprintf>
    cprintf("\n");
  100d39:	c7 04 24 22 63 10 00 	movl   $0x106322,(%esp)
  100d40:	e8 21 f6 ff ff       	call   100366 <cprintf>
    
    cprintf("stack trackback:\n");
  100d45:	c7 04 24 24 63 10 00 	movl   $0x106324,(%esp)
  100d4c:	e8 15 f6 ff ff       	call   100366 <cprintf>
    print_stackframe();
  100d51:	e8 7f fc ff ff       	call   1009d5 <print_stackframe>
  100d56:	eb 01                	jmp    100d59 <__panic+0x6b>
        goto panic_dead;
  100d58:	90                   	nop
    
    va_end(ap);

panic_dead:
    intr_disable();
  100d59:	e8 e9 09 00 00       	call   101747 <intr_disable>
    while (1) {
        kmonitor(NULL);
  100d5e:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  100d65:	e8 9d fe ff ff       	call   100c07 <kmonitor>
  100d6a:	eb f2                	jmp    100d5e <__panic+0x70>

00100d6c <__warn>:
    }
}

/* __warn - like panic, but don't */
void
__warn(const char *file, int line, const char *fmt, ...) {
  100d6c:	55                   	push   %ebp
  100d6d:	89 e5                	mov    %esp,%ebp
  100d6f:	83 ec 28             	sub    $0x28,%esp
    va_list ap;
    va_start(ap, fmt);
  100d72:	8d 45 14             	lea    0x14(%ebp),%eax
  100d75:	89 45 f4             	mov    %eax,-0xc(%ebp)
    cprintf("kernel warning at %s:%d:\n    ", file, line);
  100d78:	8b 45 0c             	mov    0xc(%ebp),%eax
  100d7b:	89 44 24 08          	mov    %eax,0x8(%esp)
  100d7f:	8b 45 08             	mov    0x8(%ebp),%eax
  100d82:	89 44 24 04          	mov    %eax,0x4(%esp)
  100d86:	c7 04 24 36 63 10 00 	movl   $0x106336,(%esp)
  100d8d:	e8 d4 f5 ff ff       	call   100366 <cprintf>
    vcprintf(fmt, ap);
  100d92:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100d95:	89 44 24 04          	mov    %eax,0x4(%esp)
  100d99:	8b 45 10             	mov    0x10(%ebp),%eax
  100d9c:	89 04 24             	mov    %eax,(%esp)
  100d9f:	e8 8d f5 ff ff       	call   100331 <vcprintf>
    cprintf("\n");
  100da4:	c7 04 24 22 63 10 00 	movl   $0x106322,(%esp)
  100dab:	e8 b6 f5 ff ff       	call   100366 <cprintf>
    va_end(ap);
}
  100db0:	90                   	nop
  100db1:	89 ec                	mov    %ebp,%esp
  100db3:	5d                   	pop    %ebp
  100db4:	c3                   	ret    

00100db5 <is_kernel_panic>:

bool
is_kernel_panic(void) {
  100db5:	55                   	push   %ebp
  100db6:	89 e5                	mov    %esp,%ebp
    return is_panic;
  100db8:	a1 20 c4 11 00       	mov    0x11c420,%eax
}
  100dbd:	5d                   	pop    %ebp
  100dbe:	c3                   	ret    

00100dbf <clock_init>:
/* *
 * clock_init - initialize 8253 clock to interrupt 100 times per second,
 * and then enable IRQ_TIMER.
 * */
void
clock_init(void) {
  100dbf:	55                   	push   %ebp
  100dc0:	89 e5                	mov    %esp,%ebp
  100dc2:	83 ec 28             	sub    $0x28,%esp
  100dc5:	66 c7 45 ee 43 00    	movw   $0x43,-0x12(%ebp)
  100dcb:	c6 45 ed 34          	movb   $0x34,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  100dcf:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  100dd3:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  100dd7:	ee                   	out    %al,(%dx)
}
  100dd8:	90                   	nop
  100dd9:	66 c7 45 f2 40 00    	movw   $0x40,-0xe(%ebp)
  100ddf:	c6 45 f1 9c          	movb   $0x9c,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  100de3:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  100de7:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  100deb:	ee                   	out    %al,(%dx)
}
  100dec:	90                   	nop
  100ded:	66 c7 45 f6 40 00    	movw   $0x40,-0xa(%ebp)
  100df3:	c6 45 f5 2e          	movb   $0x2e,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  100df7:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  100dfb:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  100dff:	ee                   	out    %al,(%dx)
}
  100e00:	90                   	nop
    outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT);
    outb(IO_TIMER1, TIMER_DIV(100) % 256);
    outb(IO_TIMER1, TIMER_DIV(100) / 256);

    // initialize time counter 'ticks' to zero
    ticks = 0;
  100e01:	c7 05 24 c4 11 00 00 	movl   $0x0,0x11c424
  100e08:	00 00 00 

    cprintf("++ setup timer interrupts\n");
  100e0b:	c7 04 24 54 63 10 00 	movl   $0x106354,(%esp)
  100e12:	e8 4f f5 ff ff       	call   100366 <cprintf>
    pic_enable(IRQ_TIMER);
  100e17:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  100e1e:	e8 89 09 00 00       	call   1017ac <pic_enable>
}
  100e23:	90                   	nop
  100e24:	89 ec                	mov    %ebp,%esp
  100e26:	5d                   	pop    %ebp
  100e27:	c3                   	ret    

00100e28 <__intr_save>:
#include <x86.h>
#include <intr.h>
#include <mmu.h>

static inline bool
__intr_save(void) {
  100e28:	55                   	push   %ebp
  100e29:	89 e5                	mov    %esp,%ebp
  100e2b:	83 ec 18             	sub    $0x18,%esp
}

static inline uint32_t
read_eflags(void) {
    uint32_t eflags;
    asm volatile ("pushfl; popl %0" : "=r" (eflags));
  100e2e:	9c                   	pushf  
  100e2f:	58                   	pop    %eax
  100e30:	89 45 f4             	mov    %eax,-0xc(%ebp)
    return eflags;
  100e33:	8b 45 f4             	mov    -0xc(%ebp),%eax
    if (read_eflags() & FL_IF) {
  100e36:	25 00 02 00 00       	and    $0x200,%eax
  100e3b:	85 c0                	test   %eax,%eax
  100e3d:	74 0c                	je     100e4b <__intr_save+0x23>
        intr_disable();
  100e3f:	e8 03 09 00 00       	call   101747 <intr_disable>
        return 1;
  100e44:	b8 01 00 00 00       	mov    $0x1,%eax
  100e49:	eb 05                	jmp    100e50 <__intr_save+0x28>
    }
    return 0;
  100e4b:	b8 00 00 00 00       	mov    $0x0,%eax
}
  100e50:	89 ec                	mov    %ebp,%esp
  100e52:	5d                   	pop    %ebp
  100e53:	c3                   	ret    

00100e54 <__intr_restore>:

static inline void
__intr_restore(bool flag) {
  100e54:	55                   	push   %ebp
  100e55:	89 e5                	mov    %esp,%ebp
  100e57:	83 ec 08             	sub    $0x8,%esp
    if (flag) {
  100e5a:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  100e5e:	74 05                	je     100e65 <__intr_restore+0x11>
        intr_enable();
  100e60:	e8 da 08 00 00       	call   10173f <intr_enable>
    }
}
  100e65:	90                   	nop
  100e66:	89 ec                	mov    %ebp,%esp
  100e68:	5d                   	pop    %ebp
  100e69:	c3                   	ret    

00100e6a <delay>:
#include <memlayout.h>
#include <sync.h>

/* stupid I/O delay routine necessitated by historical PC design flaws */
static void
delay(void) {
  100e6a:	55                   	push   %ebp
  100e6b:	89 e5                	mov    %esp,%ebp
  100e6d:	83 ec 10             	sub    $0x10,%esp
  100e70:	66 c7 45 f2 84 00    	movw   $0x84,-0xe(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port) : "memory");
  100e76:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  100e7a:	89 c2                	mov    %eax,%edx
  100e7c:	ec                   	in     (%dx),%al
  100e7d:	88 45 f1             	mov    %al,-0xf(%ebp)
  100e80:	66 c7 45 f6 84 00    	movw   $0x84,-0xa(%ebp)
  100e86:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  100e8a:	89 c2                	mov    %eax,%edx
  100e8c:	ec                   	in     (%dx),%al
  100e8d:	88 45 f5             	mov    %al,-0xb(%ebp)
  100e90:	66 c7 45 fa 84 00    	movw   $0x84,-0x6(%ebp)
  100e96:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  100e9a:	89 c2                	mov    %eax,%edx
  100e9c:	ec                   	in     (%dx),%al
  100e9d:	88 45 f9             	mov    %al,-0x7(%ebp)
  100ea0:	66 c7 45 fe 84 00    	movw   $0x84,-0x2(%ebp)
  100ea6:	0f b7 45 fe          	movzwl -0x2(%ebp),%eax
  100eaa:	89 c2                	mov    %eax,%edx
  100eac:	ec                   	in     (%dx),%al
  100ead:	88 45 fd             	mov    %al,-0x3(%ebp)
    inb(0x84);
    inb(0x84);
    inb(0x84);
    inb(0x84);
}
  100eb0:	90                   	nop
  100eb1:	89 ec                	mov    %ebp,%esp
  100eb3:	5d                   	pop    %ebp
  100eb4:	c3                   	ret    

00100eb5 <cga_init>:
static uint16_t addr_6845;

/* TEXT-mode CGA/VGA display output */

static void
cga_init(void) {
  100eb5:	55                   	push   %ebp
  100eb6:	89 e5                	mov    %esp,%ebp
  100eb8:	83 ec 20             	sub    $0x20,%esp
    volatile uint16_t *cp = (uint16_t *)(CGA_BUF + KERNBASE);
  100ebb:	c7 45 fc 00 80 0b c0 	movl   $0xc00b8000,-0x4(%ebp)
    uint16_t was = *cp;
  100ec2:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100ec5:	0f b7 00             	movzwl (%eax),%eax
  100ec8:	66 89 45 fa          	mov    %ax,-0x6(%ebp)
    *cp = (uint16_t) 0xA55A;
  100ecc:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100ecf:	66 c7 00 5a a5       	movw   $0xa55a,(%eax)
    if (*cp != 0xA55A) {
  100ed4:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100ed7:	0f b7 00             	movzwl (%eax),%eax
  100eda:	0f b7 c0             	movzwl %ax,%eax
  100edd:	3d 5a a5 00 00       	cmp    $0xa55a,%eax
  100ee2:	74 12                	je     100ef6 <cga_init+0x41>
        cp = (uint16_t*)(MONO_BUF + KERNBASE);
  100ee4:	c7 45 fc 00 00 0b c0 	movl   $0xc00b0000,-0x4(%ebp)
        addr_6845 = MONO_BASE;
  100eeb:	66 c7 05 46 c4 11 00 	movw   $0x3b4,0x11c446
  100ef2:	b4 03 
  100ef4:	eb 13                	jmp    100f09 <cga_init+0x54>
    } else {
        *cp = was;
  100ef6:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100ef9:	0f b7 55 fa          	movzwl -0x6(%ebp),%edx
  100efd:	66 89 10             	mov    %dx,(%eax)
        addr_6845 = CGA_BASE;
  100f00:	66 c7 05 46 c4 11 00 	movw   $0x3d4,0x11c446
  100f07:	d4 03 
    }

    // Extract cursor location
    uint32_t pos;
    outb(addr_6845, 14);
  100f09:	0f b7 05 46 c4 11 00 	movzwl 0x11c446,%eax
  100f10:	66 89 45 e6          	mov    %ax,-0x1a(%ebp)
  100f14:	c6 45 e5 0e          	movb   $0xe,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  100f18:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  100f1c:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  100f20:	ee                   	out    %al,(%dx)
}
  100f21:	90                   	nop
    pos = inb(addr_6845 + 1) << 8;
  100f22:	0f b7 05 46 c4 11 00 	movzwl 0x11c446,%eax
  100f29:	40                   	inc    %eax
  100f2a:	0f b7 c0             	movzwl %ax,%eax
  100f2d:	66 89 45 ea          	mov    %ax,-0x16(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port) : "memory");
  100f31:	0f b7 45 ea          	movzwl -0x16(%ebp),%eax
  100f35:	89 c2                	mov    %eax,%edx
  100f37:	ec                   	in     (%dx),%al
  100f38:	88 45 e9             	mov    %al,-0x17(%ebp)
    return data;
  100f3b:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  100f3f:	0f b6 c0             	movzbl %al,%eax
  100f42:	c1 e0 08             	shl    $0x8,%eax
  100f45:	89 45 f4             	mov    %eax,-0xc(%ebp)
    outb(addr_6845, 15);
  100f48:	0f b7 05 46 c4 11 00 	movzwl 0x11c446,%eax
  100f4f:	66 89 45 ee          	mov    %ax,-0x12(%ebp)
  100f53:	c6 45 ed 0f          	movb   $0xf,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  100f57:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  100f5b:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  100f5f:	ee                   	out    %al,(%dx)
}
  100f60:	90                   	nop
    pos |= inb(addr_6845 + 1);
  100f61:	0f b7 05 46 c4 11 00 	movzwl 0x11c446,%eax
  100f68:	40                   	inc    %eax
  100f69:	0f b7 c0             	movzwl %ax,%eax
  100f6c:	66 89 45 f2          	mov    %ax,-0xe(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port) : "memory");
  100f70:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  100f74:	89 c2                	mov    %eax,%edx
  100f76:	ec                   	in     (%dx),%al
  100f77:	88 45 f1             	mov    %al,-0xf(%ebp)
    return data;
  100f7a:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  100f7e:	0f b6 c0             	movzbl %al,%eax
  100f81:	09 45 f4             	or     %eax,-0xc(%ebp)

    crt_buf = (uint16_t*) cp;
  100f84:	8b 45 fc             	mov    -0x4(%ebp),%eax
  100f87:	a3 40 c4 11 00       	mov    %eax,0x11c440
    crt_pos = pos;
  100f8c:	8b 45 f4             	mov    -0xc(%ebp),%eax
  100f8f:	0f b7 c0             	movzwl %ax,%eax
  100f92:	66 a3 44 c4 11 00    	mov    %ax,0x11c444
}
  100f98:	90                   	nop
  100f99:	89 ec                	mov    %ebp,%esp
  100f9b:	5d                   	pop    %ebp
  100f9c:	c3                   	ret    

00100f9d <serial_init>:

static bool serial_exists = 0;

static void
serial_init(void) {
  100f9d:	55                   	push   %ebp
  100f9e:	89 e5                	mov    %esp,%ebp
  100fa0:	83 ec 48             	sub    $0x48,%esp
  100fa3:	66 c7 45 d2 fa 03    	movw   $0x3fa,-0x2e(%ebp)
  100fa9:	c6 45 d1 00          	movb   $0x0,-0x2f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  100fad:	0f b6 45 d1          	movzbl -0x2f(%ebp),%eax
  100fb1:	0f b7 55 d2          	movzwl -0x2e(%ebp),%edx
  100fb5:	ee                   	out    %al,(%dx)
}
  100fb6:	90                   	nop
  100fb7:	66 c7 45 d6 fb 03    	movw   $0x3fb,-0x2a(%ebp)
  100fbd:	c6 45 d5 80          	movb   $0x80,-0x2b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  100fc1:	0f b6 45 d5          	movzbl -0x2b(%ebp),%eax
  100fc5:	0f b7 55 d6          	movzwl -0x2a(%ebp),%edx
  100fc9:	ee                   	out    %al,(%dx)
}
  100fca:	90                   	nop
  100fcb:	66 c7 45 da f8 03    	movw   $0x3f8,-0x26(%ebp)
  100fd1:	c6 45 d9 0c          	movb   $0xc,-0x27(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  100fd5:	0f b6 45 d9          	movzbl -0x27(%ebp),%eax
  100fd9:	0f b7 55 da          	movzwl -0x26(%ebp),%edx
  100fdd:	ee                   	out    %al,(%dx)
}
  100fde:	90                   	nop
  100fdf:	66 c7 45 de f9 03    	movw   $0x3f9,-0x22(%ebp)
  100fe5:	c6 45 dd 00          	movb   $0x0,-0x23(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  100fe9:	0f b6 45 dd          	movzbl -0x23(%ebp),%eax
  100fed:	0f b7 55 de          	movzwl -0x22(%ebp),%edx
  100ff1:	ee                   	out    %al,(%dx)
}
  100ff2:	90                   	nop
  100ff3:	66 c7 45 e2 fb 03    	movw   $0x3fb,-0x1e(%ebp)
  100ff9:	c6 45 e1 03          	movb   $0x3,-0x1f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  100ffd:	0f b6 45 e1          	movzbl -0x1f(%ebp),%eax
  101001:	0f b7 55 e2          	movzwl -0x1e(%ebp),%edx
  101005:	ee                   	out    %al,(%dx)
}
  101006:	90                   	nop
  101007:	66 c7 45 e6 fc 03    	movw   $0x3fc,-0x1a(%ebp)
  10100d:	c6 45 e5 00          	movb   $0x0,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  101011:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  101015:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  101019:	ee                   	out    %al,(%dx)
}
  10101a:	90                   	nop
  10101b:	66 c7 45 ea f9 03    	movw   $0x3f9,-0x16(%ebp)
  101021:	c6 45 e9 01          	movb   $0x1,-0x17(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  101025:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  101029:	0f b7 55 ea          	movzwl -0x16(%ebp),%edx
  10102d:	ee                   	out    %al,(%dx)
}
  10102e:	90                   	nop
  10102f:	66 c7 45 ee fd 03    	movw   $0x3fd,-0x12(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port) : "memory");
  101035:	0f b7 45 ee          	movzwl -0x12(%ebp),%eax
  101039:	89 c2                	mov    %eax,%edx
  10103b:	ec                   	in     (%dx),%al
  10103c:	88 45 ed             	mov    %al,-0x13(%ebp)
    return data;
  10103f:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
    // Enable rcv interrupts
    outb(COM1 + COM_IER, COM_IER_RDI);

    // Clear any preexisting overrun indications and interrupts
    // Serial port doesn't exist if COM_LSR returns 0xFF
    serial_exists = (inb(COM1 + COM_LSR) != 0xFF);
  101043:	3c ff                	cmp    $0xff,%al
  101045:	0f 95 c0             	setne  %al
  101048:	0f b6 c0             	movzbl %al,%eax
  10104b:	a3 48 c4 11 00       	mov    %eax,0x11c448
  101050:	66 c7 45 f2 fa 03    	movw   $0x3fa,-0xe(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port) : "memory");
  101056:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
  10105a:	89 c2                	mov    %eax,%edx
  10105c:	ec                   	in     (%dx),%al
  10105d:	88 45 f1             	mov    %al,-0xf(%ebp)
  101060:	66 c7 45 f6 f8 03    	movw   $0x3f8,-0xa(%ebp)
  101066:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  10106a:	89 c2                	mov    %eax,%edx
  10106c:	ec                   	in     (%dx),%al
  10106d:	88 45 f5             	mov    %al,-0xb(%ebp)
    (void) inb(COM1+COM_IIR);
    (void) inb(COM1+COM_RX);

    if (serial_exists) {
  101070:	a1 48 c4 11 00       	mov    0x11c448,%eax
  101075:	85 c0                	test   %eax,%eax
  101077:	74 0c                	je     101085 <serial_init+0xe8>
        pic_enable(IRQ_COM1);
  101079:	c7 04 24 04 00 00 00 	movl   $0x4,(%esp)
  101080:	e8 27 07 00 00       	call   1017ac <pic_enable>
    }
}
  101085:	90                   	nop
  101086:	89 ec                	mov    %ebp,%esp
  101088:	5d                   	pop    %ebp
  101089:	c3                   	ret    

0010108a <lpt_putc_sub>:

static void
lpt_putc_sub(int c) {
  10108a:	55                   	push   %ebp
  10108b:	89 e5                	mov    %esp,%ebp
  10108d:	83 ec 20             	sub    $0x20,%esp
    int i;
    for (i = 0; !(inb(LPTPORT + 1) & 0x80) && i < 12800; i ++) {
  101090:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
  101097:	eb 08                	jmp    1010a1 <lpt_putc_sub+0x17>
        delay();
  101099:	e8 cc fd ff ff       	call   100e6a <delay>
    for (i = 0; !(inb(LPTPORT + 1) & 0x80) && i < 12800; i ++) {
  10109e:	ff 45 fc             	incl   -0x4(%ebp)
  1010a1:	66 c7 45 fa 79 03    	movw   $0x379,-0x6(%ebp)
  1010a7:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  1010ab:	89 c2                	mov    %eax,%edx
  1010ad:	ec                   	in     (%dx),%al
  1010ae:	88 45 f9             	mov    %al,-0x7(%ebp)
    return data;
  1010b1:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  1010b5:	84 c0                	test   %al,%al
  1010b7:	78 09                	js     1010c2 <lpt_putc_sub+0x38>
  1010b9:	81 7d fc ff 31 00 00 	cmpl   $0x31ff,-0x4(%ebp)
  1010c0:	7e d7                	jle    101099 <lpt_putc_sub+0xf>
    }
    outb(LPTPORT + 0, c);
  1010c2:	8b 45 08             	mov    0x8(%ebp),%eax
  1010c5:	0f b6 c0             	movzbl %al,%eax
  1010c8:	66 c7 45 ee 78 03    	movw   $0x378,-0x12(%ebp)
  1010ce:	88 45 ed             	mov    %al,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  1010d1:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  1010d5:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  1010d9:	ee                   	out    %al,(%dx)
}
  1010da:	90                   	nop
  1010db:	66 c7 45 f2 7a 03    	movw   $0x37a,-0xe(%ebp)
  1010e1:	c6 45 f1 0d          	movb   $0xd,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  1010e5:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  1010e9:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  1010ed:	ee                   	out    %al,(%dx)
}
  1010ee:	90                   	nop
  1010ef:	66 c7 45 f6 7a 03    	movw   $0x37a,-0xa(%ebp)
  1010f5:	c6 45 f5 08          	movb   $0x8,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  1010f9:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  1010fd:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  101101:	ee                   	out    %al,(%dx)
}
  101102:	90                   	nop
    outb(LPTPORT + 2, 0x08 | 0x04 | 0x01);
    outb(LPTPORT + 2, 0x08);
}
  101103:	90                   	nop
  101104:	89 ec                	mov    %ebp,%esp
  101106:	5d                   	pop    %ebp
  101107:	c3                   	ret    

00101108 <lpt_putc>:

/* lpt_putc - copy console output to parallel port */
static void
lpt_putc(int c) {
  101108:	55                   	push   %ebp
  101109:	89 e5                	mov    %esp,%ebp
  10110b:	83 ec 04             	sub    $0x4,%esp
    if (c != '\b') {
  10110e:	83 7d 08 08          	cmpl   $0x8,0x8(%ebp)
  101112:	74 0d                	je     101121 <lpt_putc+0x19>
        lpt_putc_sub(c);
  101114:	8b 45 08             	mov    0x8(%ebp),%eax
  101117:	89 04 24             	mov    %eax,(%esp)
  10111a:	e8 6b ff ff ff       	call   10108a <lpt_putc_sub>
    else {
        lpt_putc_sub('\b');
        lpt_putc_sub(' ');
        lpt_putc_sub('\b');
    }
}
  10111f:	eb 24                	jmp    101145 <lpt_putc+0x3d>
        lpt_putc_sub('\b');
  101121:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  101128:	e8 5d ff ff ff       	call   10108a <lpt_putc_sub>
        lpt_putc_sub(' ');
  10112d:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
  101134:	e8 51 ff ff ff       	call   10108a <lpt_putc_sub>
        lpt_putc_sub('\b');
  101139:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  101140:	e8 45 ff ff ff       	call   10108a <lpt_putc_sub>
}
  101145:	90                   	nop
  101146:	89 ec                	mov    %ebp,%esp
  101148:	5d                   	pop    %ebp
  101149:	c3                   	ret    

0010114a <cga_putc>:

/* cga_putc - print character to console */
static void
cga_putc(int c) {
  10114a:	55                   	push   %ebp
  10114b:	89 e5                	mov    %esp,%ebp
  10114d:	83 ec 38             	sub    $0x38,%esp
  101150:	89 5d fc             	mov    %ebx,-0x4(%ebp)
    // set black on white
    if (!(c & ~0xFF)) {
  101153:	8b 45 08             	mov    0x8(%ebp),%eax
  101156:	25 00 ff ff ff       	and    $0xffffff00,%eax
  10115b:	85 c0                	test   %eax,%eax
  10115d:	75 07                	jne    101166 <cga_putc+0x1c>
        c |= 0x0700;
  10115f:	81 4d 08 00 07 00 00 	orl    $0x700,0x8(%ebp)
    }

    switch (c & 0xff) {
  101166:	8b 45 08             	mov    0x8(%ebp),%eax
  101169:	0f b6 c0             	movzbl %al,%eax
  10116c:	83 f8 0d             	cmp    $0xd,%eax
  10116f:	74 72                	je     1011e3 <cga_putc+0x99>
  101171:	83 f8 0d             	cmp    $0xd,%eax
  101174:	0f 8f a3 00 00 00    	jg     10121d <cga_putc+0xd3>
  10117a:	83 f8 08             	cmp    $0x8,%eax
  10117d:	74 0a                	je     101189 <cga_putc+0x3f>
  10117f:	83 f8 0a             	cmp    $0xa,%eax
  101182:	74 4c                	je     1011d0 <cga_putc+0x86>
  101184:	e9 94 00 00 00       	jmp    10121d <cga_putc+0xd3>
    case '\b':
        if (crt_pos > 0) {
  101189:	0f b7 05 44 c4 11 00 	movzwl 0x11c444,%eax
  101190:	85 c0                	test   %eax,%eax
  101192:	0f 84 af 00 00 00    	je     101247 <cga_putc+0xfd>
            crt_pos --;
  101198:	0f b7 05 44 c4 11 00 	movzwl 0x11c444,%eax
  10119f:	48                   	dec    %eax
  1011a0:	0f b7 c0             	movzwl %ax,%eax
  1011a3:	66 a3 44 c4 11 00    	mov    %ax,0x11c444
            crt_buf[crt_pos] = (c & ~0xff) | ' ';
  1011a9:	8b 45 08             	mov    0x8(%ebp),%eax
  1011ac:	98                   	cwtl   
  1011ad:	25 00 ff ff ff       	and    $0xffffff00,%eax
  1011b2:	98                   	cwtl   
  1011b3:	83 c8 20             	or     $0x20,%eax
  1011b6:	98                   	cwtl   
  1011b7:	8b 0d 40 c4 11 00    	mov    0x11c440,%ecx
  1011bd:	0f b7 15 44 c4 11 00 	movzwl 0x11c444,%edx
  1011c4:	01 d2                	add    %edx,%edx
  1011c6:	01 ca                	add    %ecx,%edx
  1011c8:	0f b7 c0             	movzwl %ax,%eax
  1011cb:	66 89 02             	mov    %ax,(%edx)
        }
        break;
  1011ce:	eb 77                	jmp    101247 <cga_putc+0xfd>
    case '\n':
        crt_pos += CRT_COLS;
  1011d0:	0f b7 05 44 c4 11 00 	movzwl 0x11c444,%eax
  1011d7:	83 c0 50             	add    $0x50,%eax
  1011da:	0f b7 c0             	movzwl %ax,%eax
  1011dd:	66 a3 44 c4 11 00    	mov    %ax,0x11c444
    case '\r':
        crt_pos -= (crt_pos % CRT_COLS);
  1011e3:	0f b7 1d 44 c4 11 00 	movzwl 0x11c444,%ebx
  1011ea:	0f b7 0d 44 c4 11 00 	movzwl 0x11c444,%ecx
  1011f1:	ba cd cc cc cc       	mov    $0xcccccccd,%edx
  1011f6:	89 c8                	mov    %ecx,%eax
  1011f8:	f7 e2                	mul    %edx
  1011fa:	c1 ea 06             	shr    $0x6,%edx
  1011fd:	89 d0                	mov    %edx,%eax
  1011ff:	c1 e0 02             	shl    $0x2,%eax
  101202:	01 d0                	add    %edx,%eax
  101204:	c1 e0 04             	shl    $0x4,%eax
  101207:	29 c1                	sub    %eax,%ecx
  101209:	89 ca                	mov    %ecx,%edx
  10120b:	0f b7 d2             	movzwl %dx,%edx
  10120e:	89 d8                	mov    %ebx,%eax
  101210:	29 d0                	sub    %edx,%eax
  101212:	0f b7 c0             	movzwl %ax,%eax
  101215:	66 a3 44 c4 11 00    	mov    %ax,0x11c444
        break;
  10121b:	eb 2b                	jmp    101248 <cga_putc+0xfe>
    default:
        crt_buf[crt_pos ++] = c;     // write the character
  10121d:	8b 0d 40 c4 11 00    	mov    0x11c440,%ecx
  101223:	0f b7 05 44 c4 11 00 	movzwl 0x11c444,%eax
  10122a:	8d 50 01             	lea    0x1(%eax),%edx
  10122d:	0f b7 d2             	movzwl %dx,%edx
  101230:	66 89 15 44 c4 11 00 	mov    %dx,0x11c444
  101237:	01 c0                	add    %eax,%eax
  101239:	8d 14 01             	lea    (%ecx,%eax,1),%edx
  10123c:	8b 45 08             	mov    0x8(%ebp),%eax
  10123f:	0f b7 c0             	movzwl %ax,%eax
  101242:	66 89 02             	mov    %ax,(%edx)
        break;
  101245:	eb 01                	jmp    101248 <cga_putc+0xfe>
        break;
  101247:	90                   	nop
    }

    // What is the purpose of this?
    if (crt_pos >= CRT_SIZE) {
  101248:	0f b7 05 44 c4 11 00 	movzwl 0x11c444,%eax
  10124f:	3d cf 07 00 00       	cmp    $0x7cf,%eax
  101254:	76 5e                	jbe    1012b4 <cga_putc+0x16a>
        int i;
        memmove(crt_buf, crt_buf + CRT_COLS, (CRT_SIZE - CRT_COLS) * sizeof(uint16_t));
  101256:	a1 40 c4 11 00       	mov    0x11c440,%eax
  10125b:	8d 90 a0 00 00 00    	lea    0xa0(%eax),%edx
  101261:	a1 40 c4 11 00       	mov    0x11c440,%eax
  101266:	c7 44 24 08 00 0f 00 	movl   $0xf00,0x8(%esp)
  10126d:	00 
  10126e:	89 54 24 04          	mov    %edx,0x4(%esp)
  101272:	89 04 24             	mov    %eax,(%esp)
  101275:	e8 71 4c 00 00       	call   105eeb <memmove>
        for (i = CRT_SIZE - CRT_COLS; i < CRT_SIZE; i ++) {
  10127a:	c7 45 f4 80 07 00 00 	movl   $0x780,-0xc(%ebp)
  101281:	eb 15                	jmp    101298 <cga_putc+0x14e>
            crt_buf[i] = 0x0700 | ' ';
  101283:	8b 15 40 c4 11 00    	mov    0x11c440,%edx
  101289:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10128c:	01 c0                	add    %eax,%eax
  10128e:	01 d0                	add    %edx,%eax
  101290:	66 c7 00 20 07       	movw   $0x720,(%eax)
        for (i = CRT_SIZE - CRT_COLS; i < CRT_SIZE; i ++) {
  101295:	ff 45 f4             	incl   -0xc(%ebp)
  101298:	81 7d f4 cf 07 00 00 	cmpl   $0x7cf,-0xc(%ebp)
  10129f:	7e e2                	jle    101283 <cga_putc+0x139>
        }
        crt_pos -= CRT_COLS;
  1012a1:	0f b7 05 44 c4 11 00 	movzwl 0x11c444,%eax
  1012a8:	83 e8 50             	sub    $0x50,%eax
  1012ab:	0f b7 c0             	movzwl %ax,%eax
  1012ae:	66 a3 44 c4 11 00    	mov    %ax,0x11c444
    }

    // move that little blinky thing
    outb(addr_6845, 14);
  1012b4:	0f b7 05 46 c4 11 00 	movzwl 0x11c446,%eax
  1012bb:	66 89 45 e6          	mov    %ax,-0x1a(%ebp)
  1012bf:	c6 45 e5 0e          	movb   $0xe,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  1012c3:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  1012c7:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  1012cb:	ee                   	out    %al,(%dx)
}
  1012cc:	90                   	nop
    outb(addr_6845 + 1, crt_pos >> 8);
  1012cd:	0f b7 05 44 c4 11 00 	movzwl 0x11c444,%eax
  1012d4:	c1 e8 08             	shr    $0x8,%eax
  1012d7:	0f b7 c0             	movzwl %ax,%eax
  1012da:	0f b6 c0             	movzbl %al,%eax
  1012dd:	0f b7 15 46 c4 11 00 	movzwl 0x11c446,%edx
  1012e4:	42                   	inc    %edx
  1012e5:	0f b7 d2             	movzwl %dx,%edx
  1012e8:	66 89 55 ea          	mov    %dx,-0x16(%ebp)
  1012ec:	88 45 e9             	mov    %al,-0x17(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  1012ef:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  1012f3:	0f b7 55 ea          	movzwl -0x16(%ebp),%edx
  1012f7:	ee                   	out    %al,(%dx)
}
  1012f8:	90                   	nop
    outb(addr_6845, 15);
  1012f9:	0f b7 05 46 c4 11 00 	movzwl 0x11c446,%eax
  101300:	66 89 45 ee          	mov    %ax,-0x12(%ebp)
  101304:	c6 45 ed 0f          	movb   $0xf,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  101308:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  10130c:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  101310:	ee                   	out    %al,(%dx)
}
  101311:	90                   	nop
    outb(addr_6845 + 1, crt_pos);
  101312:	0f b7 05 44 c4 11 00 	movzwl 0x11c444,%eax
  101319:	0f b6 c0             	movzbl %al,%eax
  10131c:	0f b7 15 46 c4 11 00 	movzwl 0x11c446,%edx
  101323:	42                   	inc    %edx
  101324:	0f b7 d2             	movzwl %dx,%edx
  101327:	66 89 55 f2          	mov    %dx,-0xe(%ebp)
  10132b:	88 45 f1             	mov    %al,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  10132e:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  101332:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  101336:	ee                   	out    %al,(%dx)
}
  101337:	90                   	nop
}
  101338:	90                   	nop
  101339:	8b 5d fc             	mov    -0x4(%ebp),%ebx
  10133c:	89 ec                	mov    %ebp,%esp
  10133e:	5d                   	pop    %ebp
  10133f:	c3                   	ret    

00101340 <serial_putc_sub>:

static void
serial_putc_sub(int c) {
  101340:	55                   	push   %ebp
  101341:	89 e5                	mov    %esp,%ebp
  101343:	83 ec 10             	sub    $0x10,%esp
    int i;
    for (i = 0; !(inb(COM1 + COM_LSR) & COM_LSR_TXRDY) && i < 12800; i ++) {
  101346:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
  10134d:	eb 08                	jmp    101357 <serial_putc_sub+0x17>
        delay();
  10134f:	e8 16 fb ff ff       	call   100e6a <delay>
    for (i = 0; !(inb(COM1 + COM_LSR) & COM_LSR_TXRDY) && i < 12800; i ++) {
  101354:	ff 45 fc             	incl   -0x4(%ebp)
  101357:	66 c7 45 fa fd 03    	movw   $0x3fd,-0x6(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port) : "memory");
  10135d:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  101361:	89 c2                	mov    %eax,%edx
  101363:	ec                   	in     (%dx),%al
  101364:	88 45 f9             	mov    %al,-0x7(%ebp)
    return data;
  101367:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  10136b:	0f b6 c0             	movzbl %al,%eax
  10136e:	83 e0 20             	and    $0x20,%eax
  101371:	85 c0                	test   %eax,%eax
  101373:	75 09                	jne    10137e <serial_putc_sub+0x3e>
  101375:	81 7d fc ff 31 00 00 	cmpl   $0x31ff,-0x4(%ebp)
  10137c:	7e d1                	jle    10134f <serial_putc_sub+0xf>
    }
    outb(COM1 + COM_TX, c);
  10137e:	8b 45 08             	mov    0x8(%ebp),%eax
  101381:	0f b6 c0             	movzbl %al,%eax
  101384:	66 c7 45 f6 f8 03    	movw   $0x3f8,-0xa(%ebp)
  10138a:	88 45 f5             	mov    %al,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  10138d:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  101391:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  101395:	ee                   	out    %al,(%dx)
}
  101396:	90                   	nop
}
  101397:	90                   	nop
  101398:	89 ec                	mov    %ebp,%esp
  10139a:	5d                   	pop    %ebp
  10139b:	c3                   	ret    

0010139c <serial_putc>:

/* serial_putc - print character to serial port */
static void
serial_putc(int c) {
  10139c:	55                   	push   %ebp
  10139d:	89 e5                	mov    %esp,%ebp
  10139f:	83 ec 04             	sub    $0x4,%esp
    if (c != '\b') {
  1013a2:	83 7d 08 08          	cmpl   $0x8,0x8(%ebp)
  1013a6:	74 0d                	je     1013b5 <serial_putc+0x19>
        serial_putc_sub(c);
  1013a8:	8b 45 08             	mov    0x8(%ebp),%eax
  1013ab:	89 04 24             	mov    %eax,(%esp)
  1013ae:	e8 8d ff ff ff       	call   101340 <serial_putc_sub>
    else {
        serial_putc_sub('\b');
        serial_putc_sub(' ');
        serial_putc_sub('\b');
    }
}
  1013b3:	eb 24                	jmp    1013d9 <serial_putc+0x3d>
        serial_putc_sub('\b');
  1013b5:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  1013bc:	e8 7f ff ff ff       	call   101340 <serial_putc_sub>
        serial_putc_sub(' ');
  1013c1:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
  1013c8:	e8 73 ff ff ff       	call   101340 <serial_putc_sub>
        serial_putc_sub('\b');
  1013cd:	c7 04 24 08 00 00 00 	movl   $0x8,(%esp)
  1013d4:	e8 67 ff ff ff       	call   101340 <serial_putc_sub>
}
  1013d9:	90                   	nop
  1013da:	89 ec                	mov    %ebp,%esp
  1013dc:	5d                   	pop    %ebp
  1013dd:	c3                   	ret    

001013de <cons_intr>:
/* *
 * cons_intr - called by device interrupt routines to feed input
 * characters into the circular console input buffer.
 * */
static void
cons_intr(int (*proc)(void)) {
  1013de:	55                   	push   %ebp
  1013df:	89 e5                	mov    %esp,%ebp
  1013e1:	83 ec 18             	sub    $0x18,%esp
    int c;
    while ((c = (*proc)()) != -1) {
  1013e4:	eb 33                	jmp    101419 <cons_intr+0x3b>
        if (c != 0) {
  1013e6:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  1013ea:	74 2d                	je     101419 <cons_intr+0x3b>
            cons.buf[cons.wpos ++] = c;
  1013ec:	a1 64 c6 11 00       	mov    0x11c664,%eax
  1013f1:	8d 50 01             	lea    0x1(%eax),%edx
  1013f4:	89 15 64 c6 11 00    	mov    %edx,0x11c664
  1013fa:	8b 55 f4             	mov    -0xc(%ebp),%edx
  1013fd:	88 90 60 c4 11 00    	mov    %dl,0x11c460(%eax)
            if (cons.wpos == CONSBUFSIZE) {
  101403:	a1 64 c6 11 00       	mov    0x11c664,%eax
  101408:	3d 00 02 00 00       	cmp    $0x200,%eax
  10140d:	75 0a                	jne    101419 <cons_intr+0x3b>
                cons.wpos = 0;
  10140f:	c7 05 64 c6 11 00 00 	movl   $0x0,0x11c664
  101416:	00 00 00 
    while ((c = (*proc)()) != -1) {
  101419:	8b 45 08             	mov    0x8(%ebp),%eax
  10141c:	ff d0                	call   *%eax
  10141e:	89 45 f4             	mov    %eax,-0xc(%ebp)
  101421:	83 7d f4 ff          	cmpl   $0xffffffff,-0xc(%ebp)
  101425:	75 bf                	jne    1013e6 <cons_intr+0x8>
            }
        }
    }
}
  101427:	90                   	nop
  101428:	90                   	nop
  101429:	89 ec                	mov    %ebp,%esp
  10142b:	5d                   	pop    %ebp
  10142c:	c3                   	ret    

0010142d <serial_proc_data>:

/* serial_proc_data - get data from serial port */
static int
serial_proc_data(void) {
  10142d:	55                   	push   %ebp
  10142e:	89 e5                	mov    %esp,%ebp
  101430:	83 ec 10             	sub    $0x10,%esp
  101433:	66 c7 45 fa fd 03    	movw   $0x3fd,-0x6(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port) : "memory");
  101439:	0f b7 45 fa          	movzwl -0x6(%ebp),%eax
  10143d:	89 c2                	mov    %eax,%edx
  10143f:	ec                   	in     (%dx),%al
  101440:	88 45 f9             	mov    %al,-0x7(%ebp)
    return data;
  101443:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
    if (!(inb(COM1 + COM_LSR) & COM_LSR_DATA)) {
  101447:	0f b6 c0             	movzbl %al,%eax
  10144a:	83 e0 01             	and    $0x1,%eax
  10144d:	85 c0                	test   %eax,%eax
  10144f:	75 07                	jne    101458 <serial_proc_data+0x2b>
        return -1;
  101451:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  101456:	eb 2a                	jmp    101482 <serial_proc_data+0x55>
  101458:	66 c7 45 f6 f8 03    	movw   $0x3f8,-0xa(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port) : "memory");
  10145e:	0f b7 45 f6          	movzwl -0xa(%ebp),%eax
  101462:	89 c2                	mov    %eax,%edx
  101464:	ec                   	in     (%dx),%al
  101465:	88 45 f5             	mov    %al,-0xb(%ebp)
    return data;
  101468:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
    }
    int c = inb(COM1 + COM_RX);
  10146c:	0f b6 c0             	movzbl %al,%eax
  10146f:	89 45 fc             	mov    %eax,-0x4(%ebp)
    if (c == 127) {
  101472:	83 7d fc 7f          	cmpl   $0x7f,-0x4(%ebp)
  101476:	75 07                	jne    10147f <serial_proc_data+0x52>
        c = '\b';
  101478:	c7 45 fc 08 00 00 00 	movl   $0x8,-0x4(%ebp)
    }
    return c;
  10147f:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  101482:	89 ec                	mov    %ebp,%esp
  101484:	5d                   	pop    %ebp
  101485:	c3                   	ret    

00101486 <serial_intr>:

/* serial_intr - try to feed input characters from serial port */
void
serial_intr(void) {
  101486:	55                   	push   %ebp
  101487:	89 e5                	mov    %esp,%ebp
  101489:	83 ec 18             	sub    $0x18,%esp
    if (serial_exists) {
  10148c:	a1 48 c4 11 00       	mov    0x11c448,%eax
  101491:	85 c0                	test   %eax,%eax
  101493:	74 0c                	je     1014a1 <serial_intr+0x1b>
        cons_intr(serial_proc_data);
  101495:	c7 04 24 2d 14 10 00 	movl   $0x10142d,(%esp)
  10149c:	e8 3d ff ff ff       	call   1013de <cons_intr>
    }
}
  1014a1:	90                   	nop
  1014a2:	89 ec                	mov    %ebp,%esp
  1014a4:	5d                   	pop    %ebp
  1014a5:	c3                   	ret    

001014a6 <kbd_proc_data>:
 *
 * The kbd_proc_data() function gets data from the keyboard.
 * If we finish a character, return it, else 0. And return -1 if no data.
 * */
static int
kbd_proc_data(void) {
  1014a6:	55                   	push   %ebp
  1014a7:	89 e5                	mov    %esp,%ebp
  1014a9:	83 ec 38             	sub    $0x38,%esp
  1014ac:	66 c7 45 f0 64 00    	movw   $0x64,-0x10(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port) : "memory");
  1014b2:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1014b5:	89 c2                	mov    %eax,%edx
  1014b7:	ec                   	in     (%dx),%al
  1014b8:	88 45 ef             	mov    %al,-0x11(%ebp)
    return data;
  1014bb:	0f b6 45 ef          	movzbl -0x11(%ebp),%eax
    int c;
    uint8_t data;
    static uint32_t shift;

    if ((inb(KBSTATP) & KBS_DIB) == 0) {
  1014bf:	0f b6 c0             	movzbl %al,%eax
  1014c2:	83 e0 01             	and    $0x1,%eax
  1014c5:	85 c0                	test   %eax,%eax
  1014c7:	75 0a                	jne    1014d3 <kbd_proc_data+0x2d>
        return -1;
  1014c9:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  1014ce:	e9 56 01 00 00       	jmp    101629 <kbd_proc_data+0x183>
  1014d3:	66 c7 45 ec 60 00    	movw   $0x60,-0x14(%ebp)
    asm volatile ("inb %1, %0" : "=a" (data) : "d" (port) : "memory");
  1014d9:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1014dc:	89 c2                	mov    %eax,%edx
  1014de:	ec                   	in     (%dx),%al
  1014df:	88 45 eb             	mov    %al,-0x15(%ebp)
    return data;
  1014e2:	0f b6 45 eb          	movzbl -0x15(%ebp),%eax
    }

    data = inb(KBDATAP);
  1014e6:	88 45 f3             	mov    %al,-0xd(%ebp)

    if (data == 0xE0) {
  1014e9:	80 7d f3 e0          	cmpb   $0xe0,-0xd(%ebp)
  1014ed:	75 17                	jne    101506 <kbd_proc_data+0x60>
        // E0 escape character
        shift |= E0ESC;
  1014ef:	a1 68 c6 11 00       	mov    0x11c668,%eax
  1014f4:	83 c8 40             	or     $0x40,%eax
  1014f7:	a3 68 c6 11 00       	mov    %eax,0x11c668
        return 0;
  1014fc:	b8 00 00 00 00       	mov    $0x0,%eax
  101501:	e9 23 01 00 00       	jmp    101629 <kbd_proc_data+0x183>
    } else if (data & 0x80) {
  101506:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  10150a:	84 c0                	test   %al,%al
  10150c:	79 45                	jns    101553 <kbd_proc_data+0xad>
        // Key released
        data = (shift & E0ESC ? data : data & 0x7F);
  10150e:	a1 68 c6 11 00       	mov    0x11c668,%eax
  101513:	83 e0 40             	and    $0x40,%eax
  101516:	85 c0                	test   %eax,%eax
  101518:	75 08                	jne    101522 <kbd_proc_data+0x7c>
  10151a:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  10151e:	24 7f                	and    $0x7f,%al
  101520:	eb 04                	jmp    101526 <kbd_proc_data+0x80>
  101522:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  101526:	88 45 f3             	mov    %al,-0xd(%ebp)
        shift &= ~(shiftcode[data] | E0ESC);
  101529:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  10152d:	0f b6 80 40 90 11 00 	movzbl 0x119040(%eax),%eax
  101534:	0c 40                	or     $0x40,%al
  101536:	0f b6 c0             	movzbl %al,%eax
  101539:	f7 d0                	not    %eax
  10153b:	89 c2                	mov    %eax,%edx
  10153d:	a1 68 c6 11 00       	mov    0x11c668,%eax
  101542:	21 d0                	and    %edx,%eax
  101544:	a3 68 c6 11 00       	mov    %eax,0x11c668
        return 0;
  101549:	b8 00 00 00 00       	mov    $0x0,%eax
  10154e:	e9 d6 00 00 00       	jmp    101629 <kbd_proc_data+0x183>
    } else if (shift & E0ESC) {
  101553:	a1 68 c6 11 00       	mov    0x11c668,%eax
  101558:	83 e0 40             	and    $0x40,%eax
  10155b:	85 c0                	test   %eax,%eax
  10155d:	74 11                	je     101570 <kbd_proc_data+0xca>
        // Last character was an E0 escape; or with 0x80
        data |= 0x80;
  10155f:	80 4d f3 80          	orb    $0x80,-0xd(%ebp)
        shift &= ~E0ESC;
  101563:	a1 68 c6 11 00       	mov    0x11c668,%eax
  101568:	83 e0 bf             	and    $0xffffffbf,%eax
  10156b:	a3 68 c6 11 00       	mov    %eax,0x11c668
    }

    shift |= shiftcode[data];
  101570:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  101574:	0f b6 80 40 90 11 00 	movzbl 0x119040(%eax),%eax
  10157b:	0f b6 d0             	movzbl %al,%edx
  10157e:	a1 68 c6 11 00       	mov    0x11c668,%eax
  101583:	09 d0                	or     %edx,%eax
  101585:	a3 68 c6 11 00       	mov    %eax,0x11c668
    shift ^= togglecode[data];
  10158a:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  10158e:	0f b6 80 40 91 11 00 	movzbl 0x119140(%eax),%eax
  101595:	0f b6 d0             	movzbl %al,%edx
  101598:	a1 68 c6 11 00       	mov    0x11c668,%eax
  10159d:	31 d0                	xor    %edx,%eax
  10159f:	a3 68 c6 11 00       	mov    %eax,0x11c668

    c = charcode[shift & (CTL | SHIFT)][data];
  1015a4:	a1 68 c6 11 00       	mov    0x11c668,%eax
  1015a9:	83 e0 03             	and    $0x3,%eax
  1015ac:	8b 14 85 40 95 11 00 	mov    0x119540(,%eax,4),%edx
  1015b3:	0f b6 45 f3          	movzbl -0xd(%ebp),%eax
  1015b7:	01 d0                	add    %edx,%eax
  1015b9:	0f b6 00             	movzbl (%eax),%eax
  1015bc:	0f b6 c0             	movzbl %al,%eax
  1015bf:	89 45 f4             	mov    %eax,-0xc(%ebp)
    if (shift & CAPSLOCK) {
  1015c2:	a1 68 c6 11 00       	mov    0x11c668,%eax
  1015c7:	83 e0 08             	and    $0x8,%eax
  1015ca:	85 c0                	test   %eax,%eax
  1015cc:	74 22                	je     1015f0 <kbd_proc_data+0x14a>
        if ('a' <= c && c <= 'z')
  1015ce:	83 7d f4 60          	cmpl   $0x60,-0xc(%ebp)
  1015d2:	7e 0c                	jle    1015e0 <kbd_proc_data+0x13a>
  1015d4:	83 7d f4 7a          	cmpl   $0x7a,-0xc(%ebp)
  1015d8:	7f 06                	jg     1015e0 <kbd_proc_data+0x13a>
            c += 'A' - 'a';
  1015da:	83 6d f4 20          	subl   $0x20,-0xc(%ebp)
  1015de:	eb 10                	jmp    1015f0 <kbd_proc_data+0x14a>
        else if ('A' <= c && c <= 'Z')
  1015e0:	83 7d f4 40          	cmpl   $0x40,-0xc(%ebp)
  1015e4:	7e 0a                	jle    1015f0 <kbd_proc_data+0x14a>
  1015e6:	83 7d f4 5a          	cmpl   $0x5a,-0xc(%ebp)
  1015ea:	7f 04                	jg     1015f0 <kbd_proc_data+0x14a>
            c += 'a' - 'A';
  1015ec:	83 45 f4 20          	addl   $0x20,-0xc(%ebp)
    }

    // Process special keys
    // Ctrl-Alt-Del: reboot
    if (!(~shift & (CTL | ALT)) && c == KEY_DEL) {
  1015f0:	a1 68 c6 11 00       	mov    0x11c668,%eax
  1015f5:	f7 d0                	not    %eax
  1015f7:	83 e0 06             	and    $0x6,%eax
  1015fa:	85 c0                	test   %eax,%eax
  1015fc:	75 28                	jne    101626 <kbd_proc_data+0x180>
  1015fe:	81 7d f4 e9 00 00 00 	cmpl   $0xe9,-0xc(%ebp)
  101605:	75 1f                	jne    101626 <kbd_proc_data+0x180>
        cprintf("Rebooting!\n");
  101607:	c7 04 24 6f 63 10 00 	movl   $0x10636f,(%esp)
  10160e:	e8 53 ed ff ff       	call   100366 <cprintf>
  101613:	66 c7 45 e8 92 00    	movw   $0x92,-0x18(%ebp)
  101619:	c6 45 e7 03          	movb   $0x3,-0x19(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  10161d:	0f b6 45 e7          	movzbl -0x19(%ebp),%eax
  101621:	8b 55 e8             	mov    -0x18(%ebp),%edx
  101624:	ee                   	out    %al,(%dx)
}
  101625:	90                   	nop
        outb(0x92, 0x3); // courtesy of Chris Frost
    }
    return c;
  101626:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  101629:	89 ec                	mov    %ebp,%esp
  10162b:	5d                   	pop    %ebp
  10162c:	c3                   	ret    

0010162d <kbd_intr>:

/* kbd_intr - try to feed input characters from keyboard */
static void
kbd_intr(void) {
  10162d:	55                   	push   %ebp
  10162e:	89 e5                	mov    %esp,%ebp
  101630:	83 ec 18             	sub    $0x18,%esp
    cons_intr(kbd_proc_data);
  101633:	c7 04 24 a6 14 10 00 	movl   $0x1014a6,(%esp)
  10163a:	e8 9f fd ff ff       	call   1013de <cons_intr>
}
  10163f:	90                   	nop
  101640:	89 ec                	mov    %ebp,%esp
  101642:	5d                   	pop    %ebp
  101643:	c3                   	ret    

00101644 <kbd_init>:

static void
kbd_init(void) {
  101644:	55                   	push   %ebp
  101645:	89 e5                	mov    %esp,%ebp
  101647:	83 ec 18             	sub    $0x18,%esp
    // drain the kbd buffer
    kbd_intr();
  10164a:	e8 de ff ff ff       	call   10162d <kbd_intr>
    pic_enable(IRQ_KBD);
  10164f:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  101656:	e8 51 01 00 00       	call   1017ac <pic_enable>
}
  10165b:	90                   	nop
  10165c:	89 ec                	mov    %ebp,%esp
  10165e:	5d                   	pop    %ebp
  10165f:	c3                   	ret    

00101660 <cons_init>:

/* cons_init - initializes the console devices */
void
cons_init(void) {
  101660:	55                   	push   %ebp
  101661:	89 e5                	mov    %esp,%ebp
  101663:	83 ec 18             	sub    $0x18,%esp
    cga_init();
  101666:	e8 4a f8 ff ff       	call   100eb5 <cga_init>
    serial_init();
  10166b:	e8 2d f9 ff ff       	call   100f9d <serial_init>
    kbd_init();
  101670:	e8 cf ff ff ff       	call   101644 <kbd_init>
    if (!serial_exists) {
  101675:	a1 48 c4 11 00       	mov    0x11c448,%eax
  10167a:	85 c0                	test   %eax,%eax
  10167c:	75 0c                	jne    10168a <cons_init+0x2a>
        cprintf("serial port does not exist!!\n");
  10167e:	c7 04 24 7b 63 10 00 	movl   $0x10637b,(%esp)
  101685:	e8 dc ec ff ff       	call   100366 <cprintf>
    }
}
  10168a:	90                   	nop
  10168b:	89 ec                	mov    %ebp,%esp
  10168d:	5d                   	pop    %ebp
  10168e:	c3                   	ret    

0010168f <cons_putc>:

/* cons_putc - print a single character @c to console devices */
void
cons_putc(int c) {
  10168f:	55                   	push   %ebp
  101690:	89 e5                	mov    %esp,%ebp
  101692:	83 ec 28             	sub    $0x28,%esp
    bool intr_flag;
    local_intr_save(intr_flag);
  101695:	e8 8e f7 ff ff       	call   100e28 <__intr_save>
  10169a:	89 45 f4             	mov    %eax,-0xc(%ebp)
    {
        lpt_putc(c);
  10169d:	8b 45 08             	mov    0x8(%ebp),%eax
  1016a0:	89 04 24             	mov    %eax,(%esp)
  1016a3:	e8 60 fa ff ff       	call   101108 <lpt_putc>
        cga_putc(c);
  1016a8:	8b 45 08             	mov    0x8(%ebp),%eax
  1016ab:	89 04 24             	mov    %eax,(%esp)
  1016ae:	e8 97 fa ff ff       	call   10114a <cga_putc>
        serial_putc(c);
  1016b3:	8b 45 08             	mov    0x8(%ebp),%eax
  1016b6:	89 04 24             	mov    %eax,(%esp)
  1016b9:	e8 de fc ff ff       	call   10139c <serial_putc>
    }
    local_intr_restore(intr_flag);
  1016be:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1016c1:	89 04 24             	mov    %eax,(%esp)
  1016c4:	e8 8b f7 ff ff       	call   100e54 <__intr_restore>
}
  1016c9:	90                   	nop
  1016ca:	89 ec                	mov    %ebp,%esp
  1016cc:	5d                   	pop    %ebp
  1016cd:	c3                   	ret    

001016ce <cons_getc>:
/* *
 * cons_getc - return the next input character from console,
 * or 0 if none waiting.
 * */
int
cons_getc(void) {
  1016ce:	55                   	push   %ebp
  1016cf:	89 e5                	mov    %esp,%ebp
  1016d1:	83 ec 28             	sub    $0x28,%esp
    int c = 0;
  1016d4:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    bool intr_flag;
    local_intr_save(intr_flag);
  1016db:	e8 48 f7 ff ff       	call   100e28 <__intr_save>
  1016e0:	89 45 f0             	mov    %eax,-0x10(%ebp)
    {
        // poll for any pending input characters,
        // so that this function works even when interrupts are disabled
        // (e.g., when called from the kernel monitor).
        serial_intr();
  1016e3:	e8 9e fd ff ff       	call   101486 <serial_intr>
        kbd_intr();
  1016e8:	e8 40 ff ff ff       	call   10162d <kbd_intr>

        // grab the next character from the input buffer.
        if (cons.rpos != cons.wpos) {
  1016ed:	8b 15 60 c6 11 00    	mov    0x11c660,%edx
  1016f3:	a1 64 c6 11 00       	mov    0x11c664,%eax
  1016f8:	39 c2                	cmp    %eax,%edx
  1016fa:	74 31                	je     10172d <cons_getc+0x5f>
            c = cons.buf[cons.rpos ++];
  1016fc:	a1 60 c6 11 00       	mov    0x11c660,%eax
  101701:	8d 50 01             	lea    0x1(%eax),%edx
  101704:	89 15 60 c6 11 00    	mov    %edx,0x11c660
  10170a:	0f b6 80 60 c4 11 00 	movzbl 0x11c460(%eax),%eax
  101711:	0f b6 c0             	movzbl %al,%eax
  101714:	89 45 f4             	mov    %eax,-0xc(%ebp)
            if (cons.rpos == CONSBUFSIZE) {
  101717:	a1 60 c6 11 00       	mov    0x11c660,%eax
  10171c:	3d 00 02 00 00       	cmp    $0x200,%eax
  101721:	75 0a                	jne    10172d <cons_getc+0x5f>
                cons.rpos = 0;
  101723:	c7 05 60 c6 11 00 00 	movl   $0x0,0x11c660
  10172a:	00 00 00 
            }
        }
    }
    local_intr_restore(intr_flag);
  10172d:	8b 45 f0             	mov    -0x10(%ebp),%eax
  101730:	89 04 24             	mov    %eax,(%esp)
  101733:	e8 1c f7 ff ff       	call   100e54 <__intr_restore>
    return c;
  101738:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  10173b:	89 ec                	mov    %ebp,%esp
  10173d:	5d                   	pop    %ebp
  10173e:	c3                   	ret    

0010173f <intr_enable>:
#include <x86.h>
#include <intr.h>

/* intr_enable - enable irq interrupt */
void
intr_enable(void) {
  10173f:	55                   	push   %ebp
  101740:	89 e5                	mov    %esp,%ebp
    asm volatile ("sti");
  101742:	fb                   	sti    
}
  101743:	90                   	nop
    sti();
}
  101744:	90                   	nop
  101745:	5d                   	pop    %ebp
  101746:	c3                   	ret    

00101747 <intr_disable>:

/* intr_disable - disable irq interrupt */
void
intr_disable(void) {
  101747:	55                   	push   %ebp
  101748:	89 e5                	mov    %esp,%ebp
    asm volatile ("cli" ::: "memory");
  10174a:	fa                   	cli    
}
  10174b:	90                   	nop
    cli();
}
  10174c:	90                   	nop
  10174d:	5d                   	pop    %ebp
  10174e:	c3                   	ret    

0010174f <pic_setmask>:
// Initial IRQ mask has interrupt 2 enabled (for slave 8259A).
static uint16_t irq_mask = 0xFFFF & ~(1 << IRQ_SLAVE);
static bool did_init = 0;

static void
pic_setmask(uint16_t mask) {
  10174f:	55                   	push   %ebp
  101750:	89 e5                	mov    %esp,%ebp
  101752:	83 ec 14             	sub    $0x14,%esp
  101755:	8b 45 08             	mov    0x8(%ebp),%eax
  101758:	66 89 45 ec          	mov    %ax,-0x14(%ebp)
    irq_mask = mask;
  10175c:	8b 45 ec             	mov    -0x14(%ebp),%eax
  10175f:	66 a3 50 95 11 00    	mov    %ax,0x119550
    if (did_init) {
  101765:	a1 6c c6 11 00       	mov    0x11c66c,%eax
  10176a:	85 c0                	test   %eax,%eax
  10176c:	74 39                	je     1017a7 <pic_setmask+0x58>
        outb(IO_PIC1 + 1, mask);
  10176e:	8b 45 ec             	mov    -0x14(%ebp),%eax
  101771:	0f b6 c0             	movzbl %al,%eax
  101774:	66 c7 45 fa 21 00    	movw   $0x21,-0x6(%ebp)
  10177a:	88 45 f9             	mov    %al,-0x7(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  10177d:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  101781:	0f b7 55 fa          	movzwl -0x6(%ebp),%edx
  101785:	ee                   	out    %al,(%dx)
}
  101786:	90                   	nop
        outb(IO_PIC2 + 1, mask >> 8);
  101787:	0f b7 45 ec          	movzwl -0x14(%ebp),%eax
  10178b:	c1 e8 08             	shr    $0x8,%eax
  10178e:	0f b7 c0             	movzwl %ax,%eax
  101791:	0f b6 c0             	movzbl %al,%eax
  101794:	66 c7 45 fe a1 00    	movw   $0xa1,-0x2(%ebp)
  10179a:	88 45 fd             	mov    %al,-0x3(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  10179d:	0f b6 45 fd          	movzbl -0x3(%ebp),%eax
  1017a1:	0f b7 55 fe          	movzwl -0x2(%ebp),%edx
  1017a5:	ee                   	out    %al,(%dx)
}
  1017a6:	90                   	nop
    }
}
  1017a7:	90                   	nop
  1017a8:	89 ec                	mov    %ebp,%esp
  1017aa:	5d                   	pop    %ebp
  1017ab:	c3                   	ret    

001017ac <pic_enable>:

void
pic_enable(unsigned int irq) {
  1017ac:	55                   	push   %ebp
  1017ad:	89 e5                	mov    %esp,%ebp
  1017af:	83 ec 04             	sub    $0x4,%esp
    pic_setmask(irq_mask & ~(1 << irq));
  1017b2:	8b 45 08             	mov    0x8(%ebp),%eax
  1017b5:	ba 01 00 00 00       	mov    $0x1,%edx
  1017ba:	88 c1                	mov    %al,%cl
  1017bc:	d3 e2                	shl    %cl,%edx
  1017be:	89 d0                	mov    %edx,%eax
  1017c0:	98                   	cwtl   
  1017c1:	f7 d0                	not    %eax
  1017c3:	0f bf d0             	movswl %ax,%edx
  1017c6:	0f b7 05 50 95 11 00 	movzwl 0x119550,%eax
  1017cd:	98                   	cwtl   
  1017ce:	21 d0                	and    %edx,%eax
  1017d0:	98                   	cwtl   
  1017d1:	0f b7 c0             	movzwl %ax,%eax
  1017d4:	89 04 24             	mov    %eax,(%esp)
  1017d7:	e8 73 ff ff ff       	call   10174f <pic_setmask>
}
  1017dc:	90                   	nop
  1017dd:	89 ec                	mov    %ebp,%esp
  1017df:	5d                   	pop    %ebp
  1017e0:	c3                   	ret    

001017e1 <pic_init>:

/* pic_init - initialize the 8259A interrupt controllers */
void
pic_init(void) {
  1017e1:	55                   	push   %ebp
  1017e2:	89 e5                	mov    %esp,%ebp
  1017e4:	83 ec 44             	sub    $0x44,%esp
    did_init = 1;
  1017e7:	c7 05 6c c6 11 00 01 	movl   $0x1,0x11c66c
  1017ee:	00 00 00 
  1017f1:	66 c7 45 ca 21 00    	movw   $0x21,-0x36(%ebp)
  1017f7:	c6 45 c9 ff          	movb   $0xff,-0x37(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  1017fb:	0f b6 45 c9          	movzbl -0x37(%ebp),%eax
  1017ff:	0f b7 55 ca          	movzwl -0x36(%ebp),%edx
  101803:	ee                   	out    %al,(%dx)
}
  101804:	90                   	nop
  101805:	66 c7 45 ce a1 00    	movw   $0xa1,-0x32(%ebp)
  10180b:	c6 45 cd ff          	movb   $0xff,-0x33(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  10180f:	0f b6 45 cd          	movzbl -0x33(%ebp),%eax
  101813:	0f b7 55 ce          	movzwl -0x32(%ebp),%edx
  101817:	ee                   	out    %al,(%dx)
}
  101818:	90                   	nop
  101819:	66 c7 45 d2 20 00    	movw   $0x20,-0x2e(%ebp)
  10181f:	c6 45 d1 11          	movb   $0x11,-0x2f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  101823:	0f b6 45 d1          	movzbl -0x2f(%ebp),%eax
  101827:	0f b7 55 d2          	movzwl -0x2e(%ebp),%edx
  10182b:	ee                   	out    %al,(%dx)
}
  10182c:	90                   	nop
  10182d:	66 c7 45 d6 21 00    	movw   $0x21,-0x2a(%ebp)
  101833:	c6 45 d5 20          	movb   $0x20,-0x2b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  101837:	0f b6 45 d5          	movzbl -0x2b(%ebp),%eax
  10183b:	0f b7 55 d6          	movzwl -0x2a(%ebp),%edx
  10183f:	ee                   	out    %al,(%dx)
}
  101840:	90                   	nop
  101841:	66 c7 45 da 21 00    	movw   $0x21,-0x26(%ebp)
  101847:	c6 45 d9 04          	movb   $0x4,-0x27(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  10184b:	0f b6 45 d9          	movzbl -0x27(%ebp),%eax
  10184f:	0f b7 55 da          	movzwl -0x26(%ebp),%edx
  101853:	ee                   	out    %al,(%dx)
}
  101854:	90                   	nop
  101855:	66 c7 45 de 21 00    	movw   $0x21,-0x22(%ebp)
  10185b:	c6 45 dd 03          	movb   $0x3,-0x23(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  10185f:	0f b6 45 dd          	movzbl -0x23(%ebp),%eax
  101863:	0f b7 55 de          	movzwl -0x22(%ebp),%edx
  101867:	ee                   	out    %al,(%dx)
}
  101868:	90                   	nop
  101869:	66 c7 45 e2 a0 00    	movw   $0xa0,-0x1e(%ebp)
  10186f:	c6 45 e1 11          	movb   $0x11,-0x1f(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  101873:	0f b6 45 e1          	movzbl -0x1f(%ebp),%eax
  101877:	0f b7 55 e2          	movzwl -0x1e(%ebp),%edx
  10187b:	ee                   	out    %al,(%dx)
}
  10187c:	90                   	nop
  10187d:	66 c7 45 e6 a1 00    	movw   $0xa1,-0x1a(%ebp)
  101883:	c6 45 e5 28          	movb   $0x28,-0x1b(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  101887:	0f b6 45 e5          	movzbl -0x1b(%ebp),%eax
  10188b:	0f b7 55 e6          	movzwl -0x1a(%ebp),%edx
  10188f:	ee                   	out    %al,(%dx)
}
  101890:	90                   	nop
  101891:	66 c7 45 ea a1 00    	movw   $0xa1,-0x16(%ebp)
  101897:	c6 45 e9 02          	movb   $0x2,-0x17(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  10189b:	0f b6 45 e9          	movzbl -0x17(%ebp),%eax
  10189f:	0f b7 55 ea          	movzwl -0x16(%ebp),%edx
  1018a3:	ee                   	out    %al,(%dx)
}
  1018a4:	90                   	nop
  1018a5:	66 c7 45 ee a1 00    	movw   $0xa1,-0x12(%ebp)
  1018ab:	c6 45 ed 03          	movb   $0x3,-0x13(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  1018af:	0f b6 45 ed          	movzbl -0x13(%ebp),%eax
  1018b3:	0f b7 55 ee          	movzwl -0x12(%ebp),%edx
  1018b7:	ee                   	out    %al,(%dx)
}
  1018b8:	90                   	nop
  1018b9:	66 c7 45 f2 20 00    	movw   $0x20,-0xe(%ebp)
  1018bf:	c6 45 f1 68          	movb   $0x68,-0xf(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  1018c3:	0f b6 45 f1          	movzbl -0xf(%ebp),%eax
  1018c7:	0f b7 55 f2          	movzwl -0xe(%ebp),%edx
  1018cb:	ee                   	out    %al,(%dx)
}
  1018cc:	90                   	nop
  1018cd:	66 c7 45 f6 20 00    	movw   $0x20,-0xa(%ebp)
  1018d3:	c6 45 f5 0a          	movb   $0xa,-0xb(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  1018d7:	0f b6 45 f5          	movzbl -0xb(%ebp),%eax
  1018db:	0f b7 55 f6          	movzwl -0xa(%ebp),%edx
  1018df:	ee                   	out    %al,(%dx)
}
  1018e0:	90                   	nop
  1018e1:	66 c7 45 fa a0 00    	movw   $0xa0,-0x6(%ebp)
  1018e7:	c6 45 f9 68          	movb   $0x68,-0x7(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  1018eb:	0f b6 45 f9          	movzbl -0x7(%ebp),%eax
  1018ef:	0f b7 55 fa          	movzwl -0x6(%ebp),%edx
  1018f3:	ee                   	out    %al,(%dx)
}
  1018f4:	90                   	nop
  1018f5:	66 c7 45 fe a0 00    	movw   $0xa0,-0x2(%ebp)
  1018fb:	c6 45 fd 0a          	movb   $0xa,-0x3(%ebp)
    asm volatile ("outb %0, %1" :: "a" (data), "d" (port) : "memory");
  1018ff:	0f b6 45 fd          	movzbl -0x3(%ebp),%eax
  101903:	0f b7 55 fe          	movzwl -0x2(%ebp),%edx
  101907:	ee                   	out    %al,(%dx)
}
  101908:	90                   	nop
    outb(IO_PIC1, 0x0a);    // read IRR by default

    outb(IO_PIC2, 0x68);    // OCW3
    outb(IO_PIC2, 0x0a);    // OCW3

    if (irq_mask != 0xFFFF) {
  101909:	0f b7 05 50 95 11 00 	movzwl 0x119550,%eax
  101910:	3d ff ff 00 00       	cmp    $0xffff,%eax
  101915:	74 0f                	je     101926 <pic_init+0x145>
        pic_setmask(irq_mask);
  101917:	0f b7 05 50 95 11 00 	movzwl 0x119550,%eax
  10191e:	89 04 24             	mov    %eax,(%esp)
  101921:	e8 29 fe ff ff       	call   10174f <pic_setmask>
    }
}
  101926:	90                   	nop
  101927:	89 ec                	mov    %ebp,%esp
  101929:	5d                   	pop    %ebp
  10192a:	c3                   	ret    

0010192b <print_ticks>:
#include <console.h>
#include <kdebug.h>
#include<string.h>
#define TICK_NUM 100

static void print_ticks() {
  10192b:	55                   	push   %ebp
  10192c:	89 e5                	mov    %esp,%ebp
  10192e:	83 ec 18             	sub    $0x18,%esp
    cprintf("%d ticks\n",TICK_NUM);
  101931:	c7 44 24 04 64 00 00 	movl   $0x64,0x4(%esp)
  101938:	00 
  101939:	c7 04 24 a0 63 10 00 	movl   $0x1063a0,(%esp)
  101940:	e8 21 ea ff ff       	call   100366 <cprintf>
#ifdef DEBUG_GRADE
    cprintf("End of Test.\n");
    panic("EOT: kernel seems ok.");
#endif
}
  101945:	90                   	nop
  101946:	89 ec                	mov    %ebp,%esp
  101948:	5d                   	pop    %ebp
  101949:	c3                   	ret    

0010194a <idt_init>:
    sizeof(idt) - 1, (uintptr_t)idt
};

/* idt_init - initialize IDT to each of the entry points in kern/trap/vectors.S */
void
idt_init(void) {
  10194a:	55                   	push   %ebp
  10194b:	89 e5                	mov    %esp,%ebp
  10194d:	83 ec 10             	sub    $0x10,%esp
    //set up idt
    // for(int i=0;i<256;i++){
    //     SETGATE(idt[i],0,0,__vectors[i],0)
    // }
    int i;
    for (i = 0; i < sizeof(idt) / sizeof(struct gatedesc); i++){
  101950:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
  101957:	e9 c4 00 00 00       	jmp    101a20 <idt_init+0xd6>
        SETGATE(idt[i],0,GD_KTEXT,__vectors[i],DPL_KERNEL);
  10195c:	8b 45 fc             	mov    -0x4(%ebp),%eax
  10195f:	8b 04 85 e0 95 11 00 	mov    0x1195e0(,%eax,4),%eax
  101966:	0f b7 d0             	movzwl %ax,%edx
  101969:	8b 45 fc             	mov    -0x4(%ebp),%eax
  10196c:	66 89 14 c5 a0 c6 11 	mov    %dx,0x11c6a0(,%eax,8)
  101973:	00 
  101974:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101977:	66 c7 04 c5 a2 c6 11 	movw   $0x8,0x11c6a2(,%eax,8)
  10197e:	00 08 00 
  101981:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101984:	0f b6 14 c5 a4 c6 11 	movzbl 0x11c6a4(,%eax,8),%edx
  10198b:	00 
  10198c:	80 e2 e0             	and    $0xe0,%dl
  10198f:	88 14 c5 a4 c6 11 00 	mov    %dl,0x11c6a4(,%eax,8)
  101996:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101999:	0f b6 14 c5 a4 c6 11 	movzbl 0x11c6a4(,%eax,8),%edx
  1019a0:	00 
  1019a1:	80 e2 1f             	and    $0x1f,%dl
  1019a4:	88 14 c5 a4 c6 11 00 	mov    %dl,0x11c6a4(,%eax,8)
  1019ab:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1019ae:	0f b6 14 c5 a5 c6 11 	movzbl 0x11c6a5(,%eax,8),%edx
  1019b5:	00 
  1019b6:	80 e2 f0             	and    $0xf0,%dl
  1019b9:	80 ca 0e             	or     $0xe,%dl
  1019bc:	88 14 c5 a5 c6 11 00 	mov    %dl,0x11c6a5(,%eax,8)
  1019c3:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1019c6:	0f b6 14 c5 a5 c6 11 	movzbl 0x11c6a5(,%eax,8),%edx
  1019cd:	00 
  1019ce:	80 e2 ef             	and    $0xef,%dl
  1019d1:	88 14 c5 a5 c6 11 00 	mov    %dl,0x11c6a5(,%eax,8)
  1019d8:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1019db:	0f b6 14 c5 a5 c6 11 	movzbl 0x11c6a5(,%eax,8),%edx
  1019e2:	00 
  1019e3:	80 e2 9f             	and    $0x9f,%dl
  1019e6:	88 14 c5 a5 c6 11 00 	mov    %dl,0x11c6a5(,%eax,8)
  1019ed:	8b 45 fc             	mov    -0x4(%ebp),%eax
  1019f0:	0f b6 14 c5 a5 c6 11 	movzbl 0x11c6a5(,%eax,8),%edx
  1019f7:	00 
  1019f8:	80 ca 80             	or     $0x80,%dl
  1019fb:	88 14 c5 a5 c6 11 00 	mov    %dl,0x11c6a5(,%eax,8)
  101a02:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101a05:	8b 04 85 e0 95 11 00 	mov    0x1195e0(,%eax,4),%eax
  101a0c:	c1 e8 10             	shr    $0x10,%eax
  101a0f:	0f b7 d0             	movzwl %ax,%edx
  101a12:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101a15:	66 89 14 c5 a6 c6 11 	mov    %dx,0x11c6a6(,%eax,8)
  101a1c:	00 
    for (i = 0; i < sizeof(idt) / sizeof(struct gatedesc); i++){
  101a1d:	ff 45 fc             	incl   -0x4(%ebp)
  101a20:	8b 45 fc             	mov    -0x4(%ebp),%eax
  101a23:	3d ff 00 00 00       	cmp    $0xff,%eax
  101a28:	0f 86 2e ff ff ff    	jbe    10195c <idt_init+0x12>
    }
    SETGATE(idt[T_SWITCH_TOK], 0, GD_KTEXT, __vectors[T_SWITCH_TOK], DPL_USER);
  101a2e:	a1 c4 97 11 00       	mov    0x1197c4,%eax
  101a33:	0f b7 c0             	movzwl %ax,%eax
  101a36:	66 a3 68 ca 11 00    	mov    %ax,0x11ca68
  101a3c:	66 c7 05 6a ca 11 00 	movw   $0x8,0x11ca6a
  101a43:	08 00 
  101a45:	0f b6 05 6c ca 11 00 	movzbl 0x11ca6c,%eax
  101a4c:	24 e0                	and    $0xe0,%al
  101a4e:	a2 6c ca 11 00       	mov    %al,0x11ca6c
  101a53:	0f b6 05 6c ca 11 00 	movzbl 0x11ca6c,%eax
  101a5a:	24 1f                	and    $0x1f,%al
  101a5c:	a2 6c ca 11 00       	mov    %al,0x11ca6c
  101a61:	0f b6 05 6d ca 11 00 	movzbl 0x11ca6d,%eax
  101a68:	24 f0                	and    $0xf0,%al
  101a6a:	0c 0e                	or     $0xe,%al
  101a6c:	a2 6d ca 11 00       	mov    %al,0x11ca6d
  101a71:	0f b6 05 6d ca 11 00 	movzbl 0x11ca6d,%eax
  101a78:	24 ef                	and    $0xef,%al
  101a7a:	a2 6d ca 11 00       	mov    %al,0x11ca6d
  101a7f:	0f b6 05 6d ca 11 00 	movzbl 0x11ca6d,%eax
  101a86:	0c 60                	or     $0x60,%al
  101a88:	a2 6d ca 11 00       	mov    %al,0x11ca6d
  101a8d:	0f b6 05 6d ca 11 00 	movzbl 0x11ca6d,%eax
  101a94:	0c 80                	or     $0x80,%al
  101a96:	a2 6d ca 11 00       	mov    %al,0x11ca6d
  101a9b:	a1 c4 97 11 00       	mov    0x1197c4,%eax
  101aa0:	c1 e8 10             	shr    $0x10,%eax
  101aa3:	0f b7 c0             	movzwl %ax,%eax
  101aa6:	66 a3 6e ca 11 00    	mov    %ax,0x11ca6e
  101aac:	c7 45 f8 60 95 11 00 	movl   $0x119560,-0x8(%ebp)
    asm volatile ("lidt (%0)" :: "r" (pd) : "memory");
  101ab3:	8b 45 f8             	mov    -0x8(%ebp),%eax
  101ab6:	0f 01 18             	lidtl  (%eax)
}
  101ab9:	90                   	nop
    lidt(&idt_pd);
}
  101aba:	90                   	nop
  101abb:	89 ec                	mov    %ebp,%esp
  101abd:	5d                   	pop    %ebp
  101abe:	c3                   	ret    

00101abf <trapname>:

static const char *
trapname(int trapno) {
  101abf:	55                   	push   %ebp
  101ac0:	89 e5                	mov    %esp,%ebp
        "Alignment Check",
        "Machine-Check",
        "SIMD Floating-Point Exception"
    };

    if (trapno < sizeof(excnames)/sizeof(const char * const)) {
  101ac2:	8b 45 08             	mov    0x8(%ebp),%eax
  101ac5:	83 f8 13             	cmp    $0x13,%eax
  101ac8:	77 0c                	ja     101ad6 <trapname+0x17>
        return excnames[trapno];
  101aca:	8b 45 08             	mov    0x8(%ebp),%eax
  101acd:	8b 04 85 00 67 10 00 	mov    0x106700(,%eax,4),%eax
  101ad4:	eb 18                	jmp    101aee <trapname+0x2f>
    }
    if (trapno >= IRQ_OFFSET && trapno < IRQ_OFFSET + 16) {
  101ad6:	83 7d 08 1f          	cmpl   $0x1f,0x8(%ebp)
  101ada:	7e 0d                	jle    101ae9 <trapname+0x2a>
  101adc:	83 7d 08 2f          	cmpl   $0x2f,0x8(%ebp)
  101ae0:	7f 07                	jg     101ae9 <trapname+0x2a>
        return "Hardware Interrupt";
  101ae2:	b8 aa 63 10 00       	mov    $0x1063aa,%eax
  101ae7:	eb 05                	jmp    101aee <trapname+0x2f>
    }
    return "(unknown trap)";
  101ae9:	b8 bd 63 10 00       	mov    $0x1063bd,%eax
}
  101aee:	5d                   	pop    %ebp
  101aef:	c3                   	ret    

00101af0 <trap_in_kernel>:

/* trap_in_kernel - test if trap happened in kernel */
bool
trap_in_kernel(struct trapframe *tf) {
  101af0:	55                   	push   %ebp
  101af1:	89 e5                	mov    %esp,%ebp
    return (tf->tf_cs == (uint16_t)KERNEL_CS);
  101af3:	8b 45 08             	mov    0x8(%ebp),%eax
  101af6:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101afa:	83 f8 08             	cmp    $0x8,%eax
  101afd:	0f 94 c0             	sete   %al
  101b00:	0f b6 c0             	movzbl %al,%eax
}
  101b03:	5d                   	pop    %ebp
  101b04:	c3                   	ret    

00101b05 <print_trapframe>:
    "TF", "IF", "DF", "OF", NULL, NULL, "NT", NULL,
    "RF", "VM", "AC", "VIF", "VIP", "ID", NULL, NULL,
};

void
print_trapframe(struct trapframe *tf) {
  101b05:	55                   	push   %ebp
  101b06:	89 e5                	mov    %esp,%ebp
  101b08:	83 ec 28             	sub    $0x28,%esp
    cprintf("trapframe at %p\n", tf);
  101b0b:	8b 45 08             	mov    0x8(%ebp),%eax
  101b0e:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b12:	c7 04 24 fe 63 10 00 	movl   $0x1063fe,(%esp)
  101b19:	e8 48 e8 ff ff       	call   100366 <cprintf>
    print_regs(&tf->tf_regs);
  101b1e:	8b 45 08             	mov    0x8(%ebp),%eax
  101b21:	89 04 24             	mov    %eax,(%esp)
  101b24:	e8 8f 01 00 00       	call   101cb8 <print_regs>
    cprintf("  ds   0x----%04x\n", tf->tf_ds);
  101b29:	8b 45 08             	mov    0x8(%ebp),%eax
  101b2c:	0f b7 40 2c          	movzwl 0x2c(%eax),%eax
  101b30:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b34:	c7 04 24 0f 64 10 00 	movl   $0x10640f,(%esp)
  101b3b:	e8 26 e8 ff ff       	call   100366 <cprintf>
    cprintf("  es   0x----%04x\n", tf->tf_es);
  101b40:	8b 45 08             	mov    0x8(%ebp),%eax
  101b43:	0f b7 40 28          	movzwl 0x28(%eax),%eax
  101b47:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b4b:	c7 04 24 22 64 10 00 	movl   $0x106422,(%esp)
  101b52:	e8 0f e8 ff ff       	call   100366 <cprintf>
    cprintf("  fs   0x----%04x\n", tf->tf_fs);
  101b57:	8b 45 08             	mov    0x8(%ebp),%eax
  101b5a:	0f b7 40 24          	movzwl 0x24(%eax),%eax
  101b5e:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b62:	c7 04 24 35 64 10 00 	movl   $0x106435,(%esp)
  101b69:	e8 f8 e7 ff ff       	call   100366 <cprintf>
    cprintf("  gs   0x----%04x\n", tf->tf_gs);
  101b6e:	8b 45 08             	mov    0x8(%ebp),%eax
  101b71:	0f b7 40 20          	movzwl 0x20(%eax),%eax
  101b75:	89 44 24 04          	mov    %eax,0x4(%esp)
  101b79:	c7 04 24 48 64 10 00 	movl   $0x106448,(%esp)
  101b80:	e8 e1 e7 ff ff       	call   100366 <cprintf>
    cprintf("  trap 0x%08x %s\n", tf->tf_trapno, trapname(tf->tf_trapno));
  101b85:	8b 45 08             	mov    0x8(%ebp),%eax
  101b88:	8b 40 30             	mov    0x30(%eax),%eax
  101b8b:	89 04 24             	mov    %eax,(%esp)
  101b8e:	e8 2c ff ff ff       	call   101abf <trapname>
  101b93:	8b 55 08             	mov    0x8(%ebp),%edx
  101b96:	8b 52 30             	mov    0x30(%edx),%edx
  101b99:	89 44 24 08          	mov    %eax,0x8(%esp)
  101b9d:	89 54 24 04          	mov    %edx,0x4(%esp)
  101ba1:	c7 04 24 5b 64 10 00 	movl   $0x10645b,(%esp)
  101ba8:	e8 b9 e7 ff ff       	call   100366 <cprintf>
    cprintf("  err  0x%08x\n", tf->tf_err);
  101bad:	8b 45 08             	mov    0x8(%ebp),%eax
  101bb0:	8b 40 34             	mov    0x34(%eax),%eax
  101bb3:	89 44 24 04          	mov    %eax,0x4(%esp)
  101bb7:	c7 04 24 6d 64 10 00 	movl   $0x10646d,(%esp)
  101bbe:	e8 a3 e7 ff ff       	call   100366 <cprintf>
    cprintf("  eip  0x%08x\n", tf->tf_eip);
  101bc3:	8b 45 08             	mov    0x8(%ebp),%eax
  101bc6:	8b 40 38             	mov    0x38(%eax),%eax
  101bc9:	89 44 24 04          	mov    %eax,0x4(%esp)
  101bcd:	c7 04 24 7c 64 10 00 	movl   $0x10647c,(%esp)
  101bd4:	e8 8d e7 ff ff       	call   100366 <cprintf>
    cprintf("  cs   0x----%04x\n", tf->tf_cs);
  101bd9:	8b 45 08             	mov    0x8(%ebp),%eax
  101bdc:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101be0:	89 44 24 04          	mov    %eax,0x4(%esp)
  101be4:	c7 04 24 8b 64 10 00 	movl   $0x10648b,(%esp)
  101beb:	e8 76 e7 ff ff       	call   100366 <cprintf>
    cprintf("  flag 0x%08x ", tf->tf_eflags);
  101bf0:	8b 45 08             	mov    0x8(%ebp),%eax
  101bf3:	8b 40 40             	mov    0x40(%eax),%eax
  101bf6:	89 44 24 04          	mov    %eax,0x4(%esp)
  101bfa:	c7 04 24 9e 64 10 00 	movl   $0x10649e,(%esp)
  101c01:	e8 60 e7 ff ff       	call   100366 <cprintf>

    int i, j;
    for (i = 0, j = 1; i < sizeof(IA32flags) / sizeof(IA32flags[0]); i ++, j <<= 1) {
  101c06:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  101c0d:	c7 45 f0 01 00 00 00 	movl   $0x1,-0x10(%ebp)
  101c14:	eb 3d                	jmp    101c53 <print_trapframe+0x14e>
        if ((tf->tf_eflags & j) && IA32flags[i] != NULL) {
  101c16:	8b 45 08             	mov    0x8(%ebp),%eax
  101c19:	8b 50 40             	mov    0x40(%eax),%edx
  101c1c:	8b 45 f0             	mov    -0x10(%ebp),%eax
  101c1f:	21 d0                	and    %edx,%eax
  101c21:	85 c0                	test   %eax,%eax
  101c23:	74 28                	je     101c4d <print_trapframe+0x148>
  101c25:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101c28:	8b 04 85 80 95 11 00 	mov    0x119580(,%eax,4),%eax
  101c2f:	85 c0                	test   %eax,%eax
  101c31:	74 1a                	je     101c4d <print_trapframe+0x148>
            cprintf("%s,", IA32flags[i]);
  101c33:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101c36:	8b 04 85 80 95 11 00 	mov    0x119580(,%eax,4),%eax
  101c3d:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c41:	c7 04 24 ad 64 10 00 	movl   $0x1064ad,(%esp)
  101c48:	e8 19 e7 ff ff       	call   100366 <cprintf>
    for (i = 0, j = 1; i < sizeof(IA32flags) / sizeof(IA32flags[0]); i ++, j <<= 1) {
  101c4d:	ff 45 f4             	incl   -0xc(%ebp)
  101c50:	d1 65 f0             	shll   -0x10(%ebp)
  101c53:	8b 45 f4             	mov    -0xc(%ebp),%eax
  101c56:	83 f8 17             	cmp    $0x17,%eax
  101c59:	76 bb                	jbe    101c16 <print_trapframe+0x111>
        }
    }
    cprintf("IOPL=%d\n", (tf->tf_eflags & FL_IOPL_MASK) >> 12);
  101c5b:	8b 45 08             	mov    0x8(%ebp),%eax
  101c5e:	8b 40 40             	mov    0x40(%eax),%eax
  101c61:	c1 e8 0c             	shr    $0xc,%eax
  101c64:	83 e0 03             	and    $0x3,%eax
  101c67:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c6b:	c7 04 24 b1 64 10 00 	movl   $0x1064b1,(%esp)
  101c72:	e8 ef e6 ff ff       	call   100366 <cprintf>

    if (!trap_in_kernel(tf)) {
  101c77:	8b 45 08             	mov    0x8(%ebp),%eax
  101c7a:	89 04 24             	mov    %eax,(%esp)
  101c7d:	e8 6e fe ff ff       	call   101af0 <trap_in_kernel>
  101c82:	85 c0                	test   %eax,%eax
  101c84:	75 2d                	jne    101cb3 <print_trapframe+0x1ae>
        cprintf("  esp  0x%08x\n", tf->tf_esp);
  101c86:	8b 45 08             	mov    0x8(%ebp),%eax
  101c89:	8b 40 44             	mov    0x44(%eax),%eax
  101c8c:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c90:	c7 04 24 ba 64 10 00 	movl   $0x1064ba,(%esp)
  101c97:	e8 ca e6 ff ff       	call   100366 <cprintf>
        cprintf("  ss   0x----%04x\n", tf->tf_ss);
  101c9c:	8b 45 08             	mov    0x8(%ebp),%eax
  101c9f:	0f b7 40 48          	movzwl 0x48(%eax),%eax
  101ca3:	89 44 24 04          	mov    %eax,0x4(%esp)
  101ca7:	c7 04 24 c9 64 10 00 	movl   $0x1064c9,(%esp)
  101cae:	e8 b3 e6 ff ff       	call   100366 <cprintf>
    }
}
  101cb3:	90                   	nop
  101cb4:	89 ec                	mov    %ebp,%esp
  101cb6:	5d                   	pop    %ebp
  101cb7:	c3                   	ret    

00101cb8 <print_regs>:

void
print_regs(struct pushregs *regs) {
  101cb8:	55                   	push   %ebp
  101cb9:	89 e5                	mov    %esp,%ebp
  101cbb:	83 ec 18             	sub    $0x18,%esp
    cprintf("  edi  0x%08x\n", regs->reg_edi);
  101cbe:	8b 45 08             	mov    0x8(%ebp),%eax
  101cc1:	8b 00                	mov    (%eax),%eax
  101cc3:	89 44 24 04          	mov    %eax,0x4(%esp)
  101cc7:	c7 04 24 dc 64 10 00 	movl   $0x1064dc,(%esp)
  101cce:	e8 93 e6 ff ff       	call   100366 <cprintf>
    cprintf("  esi  0x%08x\n", regs->reg_esi);
  101cd3:	8b 45 08             	mov    0x8(%ebp),%eax
  101cd6:	8b 40 04             	mov    0x4(%eax),%eax
  101cd9:	89 44 24 04          	mov    %eax,0x4(%esp)
  101cdd:	c7 04 24 eb 64 10 00 	movl   $0x1064eb,(%esp)
  101ce4:	e8 7d e6 ff ff       	call   100366 <cprintf>
    cprintf("  ebp  0x%08x\n", regs->reg_ebp);
  101ce9:	8b 45 08             	mov    0x8(%ebp),%eax
  101cec:	8b 40 08             	mov    0x8(%eax),%eax
  101cef:	89 44 24 04          	mov    %eax,0x4(%esp)
  101cf3:	c7 04 24 fa 64 10 00 	movl   $0x1064fa,(%esp)
  101cfa:	e8 67 e6 ff ff       	call   100366 <cprintf>
    cprintf("  oesp 0x%08x\n", regs->reg_oesp);
  101cff:	8b 45 08             	mov    0x8(%ebp),%eax
  101d02:	8b 40 0c             	mov    0xc(%eax),%eax
  101d05:	89 44 24 04          	mov    %eax,0x4(%esp)
  101d09:	c7 04 24 09 65 10 00 	movl   $0x106509,(%esp)
  101d10:	e8 51 e6 ff ff       	call   100366 <cprintf>
    cprintf("  ebx  0x%08x\n", regs->reg_ebx);
  101d15:	8b 45 08             	mov    0x8(%ebp),%eax
  101d18:	8b 40 10             	mov    0x10(%eax),%eax
  101d1b:	89 44 24 04          	mov    %eax,0x4(%esp)
  101d1f:	c7 04 24 18 65 10 00 	movl   $0x106518,(%esp)
  101d26:	e8 3b e6 ff ff       	call   100366 <cprintf>
    cprintf("  edx  0x%08x\n", regs->reg_edx);
  101d2b:	8b 45 08             	mov    0x8(%ebp),%eax
  101d2e:	8b 40 14             	mov    0x14(%eax),%eax
  101d31:	89 44 24 04          	mov    %eax,0x4(%esp)
  101d35:	c7 04 24 27 65 10 00 	movl   $0x106527,(%esp)
  101d3c:	e8 25 e6 ff ff       	call   100366 <cprintf>
    cprintf("  ecx  0x%08x\n", regs->reg_ecx);
  101d41:	8b 45 08             	mov    0x8(%ebp),%eax
  101d44:	8b 40 18             	mov    0x18(%eax),%eax
  101d47:	89 44 24 04          	mov    %eax,0x4(%esp)
  101d4b:	c7 04 24 36 65 10 00 	movl   $0x106536,(%esp)
  101d52:	e8 0f e6 ff ff       	call   100366 <cprintf>
    cprintf("  eax  0x%08x\n", regs->reg_eax);
  101d57:	8b 45 08             	mov    0x8(%ebp),%eax
  101d5a:	8b 40 1c             	mov    0x1c(%eax),%eax
  101d5d:	89 44 24 04          	mov    %eax,0x4(%esp)
  101d61:	c7 04 24 45 65 10 00 	movl   $0x106545,(%esp)
  101d68:	e8 f9 e5 ff ff       	call   100366 <cprintf>
}
  101d6d:	90                   	nop
  101d6e:	89 ec                	mov    %ebp,%esp
  101d70:	5d                   	pop    %ebp
  101d71:	c3                   	ret    

00101d72 <trap_dispatch>:

struct trapframe *switchu2k;

/* trap_dispatch - dispatch based on what type of trap occurred */
static void
trap_dispatch(struct trapframe *tf) {
  101d72:	55                   	push   %ebp
  101d73:	89 e5                	mov    %esp,%ebp
  101d75:	83 ec 28             	sub    $0x28,%esp
    char c;
    static tickcount = 0;
    static tickcount1 = 0;
    switch (tf->tf_trapno) {
  101d78:	8b 45 08             	mov    0x8(%ebp),%eax
  101d7b:	8b 40 30             	mov    0x30(%eax),%eax
  101d7e:	83 f8 79             	cmp    $0x79,%eax
  101d81:	0f 84 2f 02 00 00    	je     101fb6 <trap_dispatch+0x244>
  101d87:	83 f8 79             	cmp    $0x79,%eax
  101d8a:	0f 87 67 02 00 00    	ja     101ff7 <trap_dispatch+0x285>
  101d90:	83 f8 78             	cmp    $0x78,%eax
  101d93:	0f 84 c7 01 00 00    	je     101f60 <trap_dispatch+0x1ee>
  101d99:	83 f8 78             	cmp    $0x78,%eax
  101d9c:	0f 87 55 02 00 00    	ja     101ff7 <trap_dispatch+0x285>
  101da2:	83 f8 2f             	cmp    $0x2f,%eax
  101da5:	0f 87 4c 02 00 00    	ja     101ff7 <trap_dispatch+0x285>
  101dab:	83 f8 2e             	cmp    $0x2e,%eax
  101dae:	0f 83 78 02 00 00    	jae    10202c <trap_dispatch+0x2ba>
  101db4:	83 f8 24             	cmp    $0x24,%eax
  101db7:	74 45                	je     101dfe <trap_dispatch+0x8c>
  101db9:	83 f8 24             	cmp    $0x24,%eax
  101dbc:	0f 87 35 02 00 00    	ja     101ff7 <trap_dispatch+0x285>
  101dc2:	83 f8 20             	cmp    $0x20,%eax
  101dc5:	74 0a                	je     101dd1 <trap_dispatch+0x5f>
  101dc7:	83 f8 21             	cmp    $0x21,%eax
  101dca:	74 5b                	je     101e27 <trap_dispatch+0xb5>
  101dcc:	e9 26 02 00 00       	jmp    101ff7 <trap_dispatch+0x285>
        /* handle the timer interrupt */
        /* (1) After a timer interrupt, you should record this event using a global variable (increase it), such as ticks in kern/driver/clock.c
         * (2) Every TICK_NUM cycle, you can print some info using a funciton, such as print_ticks().
         * (3) Too Simple? Yes, I think so!
         */
        tickcount+=1;
  101dd1:	a1 a0 ce 11 00       	mov    0x11cea0,%eax
  101dd6:	40                   	inc    %eax
  101dd7:	a3 a0 ce 11 00       	mov    %eax,0x11cea0
        if(tickcount==TICK_NUM){
  101ddc:	a1 a0 ce 11 00       	mov    0x11cea0,%eax
  101de1:	83 f8 64             	cmp    $0x64,%eax
  101de4:	0f 85 45 02 00 00    	jne    10202f <trap_dispatch+0x2bd>
            tickcount = 0;
  101dea:	c7 05 a0 ce 11 00 00 	movl   $0x0,0x11cea0
  101df1:	00 00 00 
            print_ticks();
  101df4:	e8 32 fb ff ff       	call   10192b <print_ticks>
        }
        break;
  101df9:	e9 31 02 00 00       	jmp    10202f <trap_dispatch+0x2bd>
    case IRQ_OFFSET + IRQ_COM1:
        c = cons_getc();
  101dfe:	e8 cb f8 ff ff       	call   1016ce <cons_getc>
  101e03:	88 45 f7             	mov    %al,-0x9(%ebp)
        cprintf("serial [%03d] %c\n", c, c);
  101e06:	0f be 55 f7          	movsbl -0x9(%ebp),%edx
  101e0a:	0f be 45 f7          	movsbl -0x9(%ebp),%eax
  101e0e:	89 54 24 08          	mov    %edx,0x8(%esp)
  101e12:	89 44 24 04          	mov    %eax,0x4(%esp)
  101e16:	c7 04 24 54 65 10 00 	movl   $0x106554,(%esp)
  101e1d:	e8 44 e5 ff ff       	call   100366 <cprintf>
        break;
  101e22:	e9 15 02 00 00       	jmp    10203c <trap_dispatch+0x2ca>
    case IRQ_OFFSET + IRQ_KBD:
        c = cons_getc();
  101e27:	e8 a2 f8 ff ff       	call   1016ce <cons_getc>
  101e2c:	88 45 f7             	mov    %al,-0x9(%ebp)
        // cprintf("kbd [%03d] %c\n", c, c);
        // break;
        
        if(c == '3'){
  101e2f:	80 7d f7 33          	cmpb   $0x33,-0x9(%ebp)
  101e33:	75 62                	jne    101e97 <trap_dispatch+0x125>
            //     "movl %%ebp, %%esp"
            //     :
            //     : "i"(T_SWITCH_TOU)
            // );
            // break;
            if (tf->tf_cs != USER_CS) {
  101e35:	8b 45 08             	mov    0x8(%ebp),%eax
  101e38:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101e3c:	83 f8 1b             	cmp    $0x1b,%eax
  101e3f:	0f 84 ed 01 00 00    	je     102032 <trap_dispatch+0x2c0>
                tf->tf_cs = USER_CS;
  101e45:	8b 45 08             	mov    0x8(%ebp),%eax
  101e48:	66 c7 40 3c 1b 00    	movw   $0x1b,0x3c(%eax)
                tf->tf_ds = tf->tf_es = tf->tf_ss = USER_DS;
  101e4e:	8b 45 08             	mov    0x8(%ebp),%eax
  101e51:	66 c7 40 48 23 00    	movw   $0x23,0x48(%eax)
  101e57:	8b 45 08             	mov    0x8(%ebp),%eax
  101e5a:	0f b7 50 48          	movzwl 0x48(%eax),%edx
  101e5e:	8b 45 08             	mov    0x8(%ebp),%eax
  101e61:	66 89 50 28          	mov    %dx,0x28(%eax)
  101e65:	8b 45 08             	mov    0x8(%ebp),%eax
  101e68:	0f b7 50 28          	movzwl 0x28(%eax),%edx
  101e6c:	8b 45 08             	mov    0x8(%ebp),%eax
  101e6f:	66 89 50 2c          	mov    %dx,0x2c(%eax)
                tf->tf_eflags |= FL_IOPL_MASK;
  101e73:	8b 45 08             	mov    0x8(%ebp),%eax
  101e76:	8b 40 40             	mov    0x40(%eax),%eax
  101e79:	0d 00 30 00 00       	or     $0x3000,%eax
  101e7e:	89 c2                	mov    %eax,%edx
  101e80:	8b 45 08             	mov    0x8(%ebp),%eax
  101e83:	89 50 40             	mov    %edx,0x40(%eax)
                tf->tf_esp = (uint32_t)tf + sizeof(struct trapframe) - 8;
  101e86:	8b 45 08             	mov    0x8(%ebp),%eax
  101e89:	8d 50 44             	lea    0x44(%eax),%edx
  101e8c:	8b 45 08             	mov    0x8(%ebp),%eax
  101e8f:	89 50 44             	mov    %edx,0x44(%eax)
            }
            break;
  101e92:	e9 9b 01 00 00       	jmp    102032 <trap_dispatch+0x2c0>

        }
        else if(c == '0'){
  101e97:	80 7d f7 30          	cmpb   $0x30,-0x9(%ebp)
  101e9b:	0f 85 80 00 00 00    	jne    101f21 <trap_dispatch+0x1af>
            //     "int %0 \n"
            //     "movl %%ebp, %%esp \n"
            //     :
            //     : "i"(T_SWITCH_TOK)
            // );
            if (tf->tf_cs != KERNEL_CS) {
  101ea1:	8b 45 08             	mov    0x8(%ebp),%eax
  101ea4:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101ea8:	83 f8 08             	cmp    $0x8,%eax
  101eab:	0f 84 84 01 00 00    	je     102035 <trap_dispatch+0x2c3>
                tf->tf_cs = KERNEL_CS;
  101eb1:	8b 45 08             	mov    0x8(%ebp),%eax
  101eb4:	66 c7 40 3c 08 00    	movw   $0x8,0x3c(%eax)
                tf->tf_ds = tf->tf_es = KERNEL_DS;
  101eba:	8b 45 08             	mov    0x8(%ebp),%eax
  101ebd:	66 c7 40 28 10 00    	movw   $0x10,0x28(%eax)
  101ec3:	8b 45 08             	mov    0x8(%ebp),%eax
  101ec6:	0f b7 50 28          	movzwl 0x28(%eax),%edx
  101eca:	8b 45 08             	mov    0x8(%ebp),%eax
  101ecd:	66 89 50 2c          	mov    %dx,0x2c(%eax)
                tf->tf_eflags &= ~FL_IOPL_MASK;
  101ed1:	8b 45 08             	mov    0x8(%ebp),%eax
  101ed4:	8b 40 40             	mov    0x40(%eax),%eax
  101ed7:	25 ff cf ff ff       	and    $0xffffcfff,%eax
  101edc:	89 c2                	mov    %eax,%edx
  101ede:	8b 45 08             	mov    0x8(%ebp),%eax
  101ee1:	89 50 40             	mov    %edx,0x40(%eax)
                switchu2k = (struct trapframe *)(tf->tf_esp - (sizeof(struct trapframe) - 8));
  101ee4:	8b 45 08             	mov    0x8(%ebp),%eax
  101ee7:	8b 40 44             	mov    0x44(%eax),%eax
  101eea:	83 e8 44             	sub    $0x44,%eax
  101eed:	a3 80 c6 11 00       	mov    %eax,0x11c680
                memmove(switchu2k, tf, sizeof(struct trapframe) - 8);
  101ef2:	a1 80 c6 11 00       	mov    0x11c680,%eax
  101ef7:	c7 44 24 08 44 00 00 	movl   $0x44,0x8(%esp)
  101efe:	00 
  101eff:	8b 55 08             	mov    0x8(%ebp),%edx
  101f02:	89 54 24 04          	mov    %edx,0x4(%esp)
  101f06:	89 04 24             	mov    %eax,(%esp)
  101f09:	e8 dd 3f 00 00       	call   105eeb <memmove>
                *((uint32_t *)tf - 1) = (uint32_t)switchu2k;
  101f0e:	8b 15 80 c6 11 00    	mov    0x11c680,%edx
  101f14:	8b 45 08             	mov    0x8(%ebp),%eax
  101f17:	83 e8 04             	sub    $0x4,%eax
  101f1a:	89 10                	mov    %edx,(%eax)
            }
            break;
  101f1c:	e9 14 01 00 00       	jmp    102035 <trap_dispatch+0x2c3>
        }else if(c == 'p'){
  101f21:	80 7d f7 70          	cmpb   $0x70,-0x9(%ebp)
  101f25:	75 18                	jne    101f3f <trap_dispatch+0x1cd>
            cprintf("trapframe at %p\n", tf); 
  101f27:	8b 45 08             	mov    0x8(%ebp),%eax
  101f2a:	89 44 24 04          	mov    %eax,0x4(%esp)
  101f2e:	c7 04 24 fe 63 10 00 	movl   $0x1063fe,(%esp)
  101f35:	e8 2c e4 ff ff       	call   100366 <cprintf>
            break;
  101f3a:	e9 fd 00 00 00       	jmp    10203c <trap_dispatch+0x2ca>
        }else{
            cprintf("kbd [%03d] %c\n", c, c);
  101f3f:	0f be 55 f7          	movsbl -0x9(%ebp),%edx
  101f43:	0f be 45 f7          	movsbl -0x9(%ebp),%eax
  101f47:	89 54 24 08          	mov    %edx,0x8(%esp)
  101f4b:	89 44 24 04          	mov    %eax,0x4(%esp)
  101f4f:	c7 04 24 66 65 10 00 	movl   $0x106566,(%esp)
  101f56:	e8 0b e4 ff ff       	call   100366 <cprintf>
            break;
  101f5b:	e9 dc 00 00 00       	jmp    10203c <trap_dispatch+0x2ca>
        }
    //LAB1 CHALLENGE 1 : YOUR CODE you should modify below codes.
    case T_SWITCH_TOU:
        if (tf->tf_cs != USER_CS) {
  101f60:	8b 45 08             	mov    0x8(%ebp),%eax
  101f63:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101f67:	83 f8 1b             	cmp    $0x1b,%eax
  101f6a:	0f 84 c8 00 00 00    	je     102038 <trap_dispatch+0x2c6>
            tf->tf_cs = USER_CS;
  101f70:	8b 45 08             	mov    0x8(%ebp),%eax
  101f73:	66 c7 40 3c 1b 00    	movw   $0x1b,0x3c(%eax)
            tf->tf_ds = tf->tf_es = tf->tf_ss = USER_DS;
  101f79:	8b 45 08             	mov    0x8(%ebp),%eax
  101f7c:	66 c7 40 48 23 00    	movw   $0x23,0x48(%eax)
  101f82:	8b 45 08             	mov    0x8(%ebp),%eax
  101f85:	0f b7 50 48          	movzwl 0x48(%eax),%edx
  101f89:	8b 45 08             	mov    0x8(%ebp),%eax
  101f8c:	66 89 50 28          	mov    %dx,0x28(%eax)
  101f90:	8b 45 08             	mov    0x8(%ebp),%eax
  101f93:	0f b7 50 28          	movzwl 0x28(%eax),%edx
  101f97:	8b 45 08             	mov    0x8(%ebp),%eax
  101f9a:	66 89 50 2c          	mov    %dx,0x2c(%eax)
            tf->tf_eflags |= FL_IOPL_MASK;
  101f9e:	8b 45 08             	mov    0x8(%ebp),%eax
  101fa1:	8b 40 40             	mov    0x40(%eax),%eax
  101fa4:	0d 00 30 00 00       	or     $0x3000,%eax
  101fa9:	89 c2                	mov    %eax,%edx
  101fab:	8b 45 08             	mov    0x8(%ebp),%eax
  101fae:	89 50 40             	mov    %edx,0x40(%eax)
        }
        break;
  101fb1:	e9 82 00 00 00       	jmp    102038 <trap_dispatch+0x2c6>
    case T_SWITCH_TOK:
        if (tf->tf_cs != KERNEL_CS) {
  101fb6:	8b 45 08             	mov    0x8(%ebp),%eax
  101fb9:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101fbd:	83 f8 08             	cmp    $0x8,%eax
  101fc0:	74 79                	je     10203b <trap_dispatch+0x2c9>
        tf->tf_cs = KERNEL_CS;
  101fc2:	8b 45 08             	mov    0x8(%ebp),%eax
  101fc5:	66 c7 40 3c 08 00    	movw   $0x8,0x3c(%eax)
        tf->tf_ds = tf->tf_es = KERNEL_DS;
  101fcb:	8b 45 08             	mov    0x8(%ebp),%eax
  101fce:	66 c7 40 28 10 00    	movw   $0x10,0x28(%eax)
  101fd4:	8b 45 08             	mov    0x8(%ebp),%eax
  101fd7:	0f b7 50 28          	movzwl 0x28(%eax),%edx
  101fdb:	8b 45 08             	mov    0x8(%ebp),%eax
  101fde:	66 89 50 2c          	mov    %dx,0x2c(%eax)
        tf->tf_eflags &= ~FL_IOPL_MASK;
  101fe2:	8b 45 08             	mov    0x8(%ebp),%eax
  101fe5:	8b 40 40             	mov    0x40(%eax),%eax
  101fe8:	25 ff cf ff ff       	and    $0xffffcfff,%eax
  101fed:	89 c2                	mov    %eax,%edx
  101fef:	8b 45 08             	mov    0x8(%ebp),%eax
  101ff2:	89 50 40             	mov    %edx,0x40(%eax)
        }
        break;
  101ff5:	eb 44                	jmp    10203b <trap_dispatch+0x2c9>
    case IRQ_OFFSET + IRQ_IDE2:
        /* do nothing */
        break;
    default:
        // in kernel, it must be a mistake
        if ((tf->tf_cs & 3) == 0) {
  101ff7:	8b 45 08             	mov    0x8(%ebp),%eax
  101ffa:	0f b7 40 3c          	movzwl 0x3c(%eax),%eax
  101ffe:	83 e0 03             	and    $0x3,%eax
  102001:	85 c0                	test   %eax,%eax
  102003:	75 37                	jne    10203c <trap_dispatch+0x2ca>
            print_trapframe(tf);
  102005:	8b 45 08             	mov    0x8(%ebp),%eax
  102008:	89 04 24             	mov    %eax,(%esp)
  10200b:	e8 f5 fa ff ff       	call   101b05 <print_trapframe>
            panic("unexpected trap in kernel.\n");
  102010:	c7 44 24 08 75 65 10 	movl   $0x106575,0x8(%esp)
  102017:	00 
  102018:	c7 44 24 04 f3 00 00 	movl   $0xf3,0x4(%esp)
  10201f:	00 
  102020:	c7 04 24 91 65 10 00 	movl   $0x106591,(%esp)
  102027:	e8 c2 ec ff ff       	call   100cee <__panic>
        break;
  10202c:	90                   	nop
  10202d:	eb 0d                	jmp    10203c <trap_dispatch+0x2ca>
        break;
  10202f:	90                   	nop
  102030:	eb 0a                	jmp    10203c <trap_dispatch+0x2ca>
            break;
  102032:	90                   	nop
  102033:	eb 07                	jmp    10203c <trap_dispatch+0x2ca>
            break;
  102035:	90                   	nop
  102036:	eb 04                	jmp    10203c <trap_dispatch+0x2ca>
        break;
  102038:	90                   	nop
  102039:	eb 01                	jmp    10203c <trap_dispatch+0x2ca>
        break;
  10203b:	90                   	nop
        }
    }
}
  10203c:	90                   	nop
  10203d:	89 ec                	mov    %ebp,%esp
  10203f:	5d                   	pop    %ebp
  102040:	c3                   	ret    

00102041 <trap>:
 * trap - handles or dispatches an exception/interrupt. if and when trap() returns,
 * the code in kern/trap/trapentry.S restores the old CPU state saved in the
 * trapframe and then uses the iret instruction to return from the exception.
 * */
void
trap(struct trapframe *tf) {
  102041:	55                   	push   %ebp
  102042:	89 e5                	mov    %esp,%ebp
  102044:	83 ec 18             	sub    $0x18,%esp
    // dispatch based on what type of trap occurred
    trap_dispatch(tf);
  102047:	8b 45 08             	mov    0x8(%ebp),%eax
  10204a:	89 04 24             	mov    %eax,(%esp)
  10204d:	e8 20 fd ff ff       	call   101d72 <trap_dispatch>
}
  102052:	90                   	nop
  102053:	89 ec                	mov    %ebp,%esp
  102055:	5d                   	pop    %ebp
  102056:	c3                   	ret    

00102057 <__alltraps>:
.text
.globl __alltraps
__alltraps:
    # push registers to build a trap frame
    # therefore make the stack look like a struct trapframe
    pushl %ds
  102057:	1e                   	push   %ds
    pushl %es
  102058:	06                   	push   %es
    pushl %fs
  102059:	0f a0                	push   %fs
    pushl %gs
  10205b:	0f a8                	push   %gs
    pushal
  10205d:	60                   	pusha  

    # load GD_KDATA into %ds and %es to set up data segments for kernel
    movl $GD_KDATA, %eax
  10205e:	b8 10 00 00 00       	mov    $0x10,%eax
    movw %ax, %ds
  102063:	8e d8                	mov    %eax,%ds
    movw %ax, %es
  102065:	8e c0                	mov    %eax,%es

    # push %esp to pass a pointer to the trapframe as an argument to trap()
    pushl %esp
  102067:	54                   	push   %esp

    # call trap(tf), where tf=%esp
    call trap
  102068:	e8 d4 ff ff ff       	call   102041 <trap>

    # pop the pushed stack pointer
    popl %esp
  10206d:	5c                   	pop    %esp

0010206e <__trapret>:

    # return falls through to trapret...
.globl __trapret
__trapret:
    # restore registers from stack
    popal
  10206e:	61                   	popa   

    # restore %ds, %es, %fs and %gs
    popl %gs
  10206f:	0f a9                	pop    %gs
    popl %fs
  102071:	0f a1                	pop    %fs
    popl %es
  102073:	07                   	pop    %es
    popl %ds
  102074:	1f                   	pop    %ds

    # get rid of the trap number and error code
    addl $0x8, %esp
  102075:	83 c4 08             	add    $0x8,%esp
    iret
  102078:	cf                   	iret   

00102079 <vector0>:
# handler
.text
.globl __alltraps
.globl vector0
vector0:
  pushl $0
  102079:	6a 00                	push   $0x0
  pushl $0
  10207b:	6a 00                	push   $0x0
  jmp __alltraps
  10207d:	e9 d5 ff ff ff       	jmp    102057 <__alltraps>

00102082 <vector1>:
.globl vector1
vector1:
  pushl $0
  102082:	6a 00                	push   $0x0
  pushl $1
  102084:	6a 01                	push   $0x1
  jmp __alltraps
  102086:	e9 cc ff ff ff       	jmp    102057 <__alltraps>

0010208b <vector2>:
.globl vector2
vector2:
  pushl $0
  10208b:	6a 00                	push   $0x0
  pushl $2
  10208d:	6a 02                	push   $0x2
  jmp __alltraps
  10208f:	e9 c3 ff ff ff       	jmp    102057 <__alltraps>

00102094 <vector3>:
.globl vector3
vector3:
  pushl $0
  102094:	6a 00                	push   $0x0
  pushl $3
  102096:	6a 03                	push   $0x3
  jmp __alltraps
  102098:	e9 ba ff ff ff       	jmp    102057 <__alltraps>

0010209d <vector4>:
.globl vector4
vector4:
  pushl $0
  10209d:	6a 00                	push   $0x0
  pushl $4
  10209f:	6a 04                	push   $0x4
  jmp __alltraps
  1020a1:	e9 b1 ff ff ff       	jmp    102057 <__alltraps>

001020a6 <vector5>:
.globl vector5
vector5:
  pushl $0
  1020a6:	6a 00                	push   $0x0
  pushl $5
  1020a8:	6a 05                	push   $0x5
  jmp __alltraps
  1020aa:	e9 a8 ff ff ff       	jmp    102057 <__alltraps>

001020af <vector6>:
.globl vector6
vector6:
  pushl $0
  1020af:	6a 00                	push   $0x0
  pushl $6
  1020b1:	6a 06                	push   $0x6
  jmp __alltraps
  1020b3:	e9 9f ff ff ff       	jmp    102057 <__alltraps>

001020b8 <vector7>:
.globl vector7
vector7:
  pushl $0
  1020b8:	6a 00                	push   $0x0
  pushl $7
  1020ba:	6a 07                	push   $0x7
  jmp __alltraps
  1020bc:	e9 96 ff ff ff       	jmp    102057 <__alltraps>

001020c1 <vector8>:
.globl vector8
vector8:
  pushl $8
  1020c1:	6a 08                	push   $0x8
  jmp __alltraps
  1020c3:	e9 8f ff ff ff       	jmp    102057 <__alltraps>

001020c8 <vector9>:
.globl vector9
vector9:
  pushl $0
  1020c8:	6a 00                	push   $0x0
  pushl $9
  1020ca:	6a 09                	push   $0x9
  jmp __alltraps
  1020cc:	e9 86 ff ff ff       	jmp    102057 <__alltraps>

001020d1 <vector10>:
.globl vector10
vector10:
  pushl $10
  1020d1:	6a 0a                	push   $0xa
  jmp __alltraps
  1020d3:	e9 7f ff ff ff       	jmp    102057 <__alltraps>

001020d8 <vector11>:
.globl vector11
vector11:
  pushl $11
  1020d8:	6a 0b                	push   $0xb
  jmp __alltraps
  1020da:	e9 78 ff ff ff       	jmp    102057 <__alltraps>

001020df <vector12>:
.globl vector12
vector12:
  pushl $12
  1020df:	6a 0c                	push   $0xc
  jmp __alltraps
  1020e1:	e9 71 ff ff ff       	jmp    102057 <__alltraps>

001020e6 <vector13>:
.globl vector13
vector13:
  pushl $13
  1020e6:	6a 0d                	push   $0xd
  jmp __alltraps
  1020e8:	e9 6a ff ff ff       	jmp    102057 <__alltraps>

001020ed <vector14>:
.globl vector14
vector14:
  pushl $14
  1020ed:	6a 0e                	push   $0xe
  jmp __alltraps
  1020ef:	e9 63 ff ff ff       	jmp    102057 <__alltraps>

001020f4 <vector15>:
.globl vector15
vector15:
  pushl $0
  1020f4:	6a 00                	push   $0x0
  pushl $15
  1020f6:	6a 0f                	push   $0xf
  jmp __alltraps
  1020f8:	e9 5a ff ff ff       	jmp    102057 <__alltraps>

001020fd <vector16>:
.globl vector16
vector16:
  pushl $0
  1020fd:	6a 00                	push   $0x0
  pushl $16
  1020ff:	6a 10                	push   $0x10
  jmp __alltraps
  102101:	e9 51 ff ff ff       	jmp    102057 <__alltraps>

00102106 <vector17>:
.globl vector17
vector17:
  pushl $17
  102106:	6a 11                	push   $0x11
  jmp __alltraps
  102108:	e9 4a ff ff ff       	jmp    102057 <__alltraps>

0010210d <vector18>:
.globl vector18
vector18:
  pushl $0
  10210d:	6a 00                	push   $0x0
  pushl $18
  10210f:	6a 12                	push   $0x12
  jmp __alltraps
  102111:	e9 41 ff ff ff       	jmp    102057 <__alltraps>

00102116 <vector19>:
.globl vector19
vector19:
  pushl $0
  102116:	6a 00                	push   $0x0
  pushl $19
  102118:	6a 13                	push   $0x13
  jmp __alltraps
  10211a:	e9 38 ff ff ff       	jmp    102057 <__alltraps>

0010211f <vector20>:
.globl vector20
vector20:
  pushl $0
  10211f:	6a 00                	push   $0x0
  pushl $20
  102121:	6a 14                	push   $0x14
  jmp __alltraps
  102123:	e9 2f ff ff ff       	jmp    102057 <__alltraps>

00102128 <vector21>:
.globl vector21
vector21:
  pushl $0
  102128:	6a 00                	push   $0x0
  pushl $21
  10212a:	6a 15                	push   $0x15
  jmp __alltraps
  10212c:	e9 26 ff ff ff       	jmp    102057 <__alltraps>

00102131 <vector22>:
.globl vector22
vector22:
  pushl $0
  102131:	6a 00                	push   $0x0
  pushl $22
  102133:	6a 16                	push   $0x16
  jmp __alltraps
  102135:	e9 1d ff ff ff       	jmp    102057 <__alltraps>

0010213a <vector23>:
.globl vector23
vector23:
  pushl $0
  10213a:	6a 00                	push   $0x0
  pushl $23
  10213c:	6a 17                	push   $0x17
  jmp __alltraps
  10213e:	e9 14 ff ff ff       	jmp    102057 <__alltraps>

00102143 <vector24>:
.globl vector24
vector24:
  pushl $0
  102143:	6a 00                	push   $0x0
  pushl $24
  102145:	6a 18                	push   $0x18
  jmp __alltraps
  102147:	e9 0b ff ff ff       	jmp    102057 <__alltraps>

0010214c <vector25>:
.globl vector25
vector25:
  pushl $0
  10214c:	6a 00                	push   $0x0
  pushl $25
  10214e:	6a 19                	push   $0x19
  jmp __alltraps
  102150:	e9 02 ff ff ff       	jmp    102057 <__alltraps>

00102155 <vector26>:
.globl vector26
vector26:
  pushl $0
  102155:	6a 00                	push   $0x0
  pushl $26
  102157:	6a 1a                	push   $0x1a
  jmp __alltraps
  102159:	e9 f9 fe ff ff       	jmp    102057 <__alltraps>

0010215e <vector27>:
.globl vector27
vector27:
  pushl $0
  10215e:	6a 00                	push   $0x0
  pushl $27
  102160:	6a 1b                	push   $0x1b
  jmp __alltraps
  102162:	e9 f0 fe ff ff       	jmp    102057 <__alltraps>

00102167 <vector28>:
.globl vector28
vector28:
  pushl $0
  102167:	6a 00                	push   $0x0
  pushl $28
  102169:	6a 1c                	push   $0x1c
  jmp __alltraps
  10216b:	e9 e7 fe ff ff       	jmp    102057 <__alltraps>

00102170 <vector29>:
.globl vector29
vector29:
  pushl $0
  102170:	6a 00                	push   $0x0
  pushl $29
  102172:	6a 1d                	push   $0x1d
  jmp __alltraps
  102174:	e9 de fe ff ff       	jmp    102057 <__alltraps>

00102179 <vector30>:
.globl vector30
vector30:
  pushl $0
  102179:	6a 00                	push   $0x0
  pushl $30
  10217b:	6a 1e                	push   $0x1e
  jmp __alltraps
  10217d:	e9 d5 fe ff ff       	jmp    102057 <__alltraps>

00102182 <vector31>:
.globl vector31
vector31:
  pushl $0
  102182:	6a 00                	push   $0x0
  pushl $31
  102184:	6a 1f                	push   $0x1f
  jmp __alltraps
  102186:	e9 cc fe ff ff       	jmp    102057 <__alltraps>

0010218b <vector32>:
.globl vector32
vector32:
  pushl $0
  10218b:	6a 00                	push   $0x0
  pushl $32
  10218d:	6a 20                	push   $0x20
  jmp __alltraps
  10218f:	e9 c3 fe ff ff       	jmp    102057 <__alltraps>

00102194 <vector33>:
.globl vector33
vector33:
  pushl $0
  102194:	6a 00                	push   $0x0
  pushl $33
  102196:	6a 21                	push   $0x21
  jmp __alltraps
  102198:	e9 ba fe ff ff       	jmp    102057 <__alltraps>

0010219d <vector34>:
.globl vector34
vector34:
  pushl $0
  10219d:	6a 00                	push   $0x0
  pushl $34
  10219f:	6a 22                	push   $0x22
  jmp __alltraps
  1021a1:	e9 b1 fe ff ff       	jmp    102057 <__alltraps>

001021a6 <vector35>:
.globl vector35
vector35:
  pushl $0
  1021a6:	6a 00                	push   $0x0
  pushl $35
  1021a8:	6a 23                	push   $0x23
  jmp __alltraps
  1021aa:	e9 a8 fe ff ff       	jmp    102057 <__alltraps>

001021af <vector36>:
.globl vector36
vector36:
  pushl $0
  1021af:	6a 00                	push   $0x0
  pushl $36
  1021b1:	6a 24                	push   $0x24
  jmp __alltraps
  1021b3:	e9 9f fe ff ff       	jmp    102057 <__alltraps>

001021b8 <vector37>:
.globl vector37
vector37:
  pushl $0
  1021b8:	6a 00                	push   $0x0
  pushl $37
  1021ba:	6a 25                	push   $0x25
  jmp __alltraps
  1021bc:	e9 96 fe ff ff       	jmp    102057 <__alltraps>

001021c1 <vector38>:
.globl vector38
vector38:
  pushl $0
  1021c1:	6a 00                	push   $0x0
  pushl $38
  1021c3:	6a 26                	push   $0x26
  jmp __alltraps
  1021c5:	e9 8d fe ff ff       	jmp    102057 <__alltraps>

001021ca <vector39>:
.globl vector39
vector39:
  pushl $0
  1021ca:	6a 00                	push   $0x0
  pushl $39
  1021cc:	6a 27                	push   $0x27
  jmp __alltraps
  1021ce:	e9 84 fe ff ff       	jmp    102057 <__alltraps>

001021d3 <vector40>:
.globl vector40
vector40:
  pushl $0
  1021d3:	6a 00                	push   $0x0
  pushl $40
  1021d5:	6a 28                	push   $0x28
  jmp __alltraps
  1021d7:	e9 7b fe ff ff       	jmp    102057 <__alltraps>

001021dc <vector41>:
.globl vector41
vector41:
  pushl $0
  1021dc:	6a 00                	push   $0x0
  pushl $41
  1021de:	6a 29                	push   $0x29
  jmp __alltraps
  1021e0:	e9 72 fe ff ff       	jmp    102057 <__alltraps>

001021e5 <vector42>:
.globl vector42
vector42:
  pushl $0
  1021e5:	6a 00                	push   $0x0
  pushl $42
  1021e7:	6a 2a                	push   $0x2a
  jmp __alltraps
  1021e9:	e9 69 fe ff ff       	jmp    102057 <__alltraps>

001021ee <vector43>:
.globl vector43
vector43:
  pushl $0
  1021ee:	6a 00                	push   $0x0
  pushl $43
  1021f0:	6a 2b                	push   $0x2b
  jmp __alltraps
  1021f2:	e9 60 fe ff ff       	jmp    102057 <__alltraps>

001021f7 <vector44>:
.globl vector44
vector44:
  pushl $0
  1021f7:	6a 00                	push   $0x0
  pushl $44
  1021f9:	6a 2c                	push   $0x2c
  jmp __alltraps
  1021fb:	e9 57 fe ff ff       	jmp    102057 <__alltraps>

00102200 <vector45>:
.globl vector45
vector45:
  pushl $0
  102200:	6a 00                	push   $0x0
  pushl $45
  102202:	6a 2d                	push   $0x2d
  jmp __alltraps
  102204:	e9 4e fe ff ff       	jmp    102057 <__alltraps>

00102209 <vector46>:
.globl vector46
vector46:
  pushl $0
  102209:	6a 00                	push   $0x0
  pushl $46
  10220b:	6a 2e                	push   $0x2e
  jmp __alltraps
  10220d:	e9 45 fe ff ff       	jmp    102057 <__alltraps>

00102212 <vector47>:
.globl vector47
vector47:
  pushl $0
  102212:	6a 00                	push   $0x0
  pushl $47
  102214:	6a 2f                	push   $0x2f
  jmp __alltraps
  102216:	e9 3c fe ff ff       	jmp    102057 <__alltraps>

0010221b <vector48>:
.globl vector48
vector48:
  pushl $0
  10221b:	6a 00                	push   $0x0
  pushl $48
  10221d:	6a 30                	push   $0x30
  jmp __alltraps
  10221f:	e9 33 fe ff ff       	jmp    102057 <__alltraps>

00102224 <vector49>:
.globl vector49
vector49:
  pushl $0
  102224:	6a 00                	push   $0x0
  pushl $49
  102226:	6a 31                	push   $0x31
  jmp __alltraps
  102228:	e9 2a fe ff ff       	jmp    102057 <__alltraps>

0010222d <vector50>:
.globl vector50
vector50:
  pushl $0
  10222d:	6a 00                	push   $0x0
  pushl $50
  10222f:	6a 32                	push   $0x32
  jmp __alltraps
  102231:	e9 21 fe ff ff       	jmp    102057 <__alltraps>

00102236 <vector51>:
.globl vector51
vector51:
  pushl $0
  102236:	6a 00                	push   $0x0
  pushl $51
  102238:	6a 33                	push   $0x33
  jmp __alltraps
  10223a:	e9 18 fe ff ff       	jmp    102057 <__alltraps>

0010223f <vector52>:
.globl vector52
vector52:
  pushl $0
  10223f:	6a 00                	push   $0x0
  pushl $52
  102241:	6a 34                	push   $0x34
  jmp __alltraps
  102243:	e9 0f fe ff ff       	jmp    102057 <__alltraps>

00102248 <vector53>:
.globl vector53
vector53:
  pushl $0
  102248:	6a 00                	push   $0x0
  pushl $53
  10224a:	6a 35                	push   $0x35
  jmp __alltraps
  10224c:	e9 06 fe ff ff       	jmp    102057 <__alltraps>

00102251 <vector54>:
.globl vector54
vector54:
  pushl $0
  102251:	6a 00                	push   $0x0
  pushl $54
  102253:	6a 36                	push   $0x36
  jmp __alltraps
  102255:	e9 fd fd ff ff       	jmp    102057 <__alltraps>

0010225a <vector55>:
.globl vector55
vector55:
  pushl $0
  10225a:	6a 00                	push   $0x0
  pushl $55
  10225c:	6a 37                	push   $0x37
  jmp __alltraps
  10225e:	e9 f4 fd ff ff       	jmp    102057 <__alltraps>

00102263 <vector56>:
.globl vector56
vector56:
  pushl $0
  102263:	6a 00                	push   $0x0
  pushl $56
  102265:	6a 38                	push   $0x38
  jmp __alltraps
  102267:	e9 eb fd ff ff       	jmp    102057 <__alltraps>

0010226c <vector57>:
.globl vector57
vector57:
  pushl $0
  10226c:	6a 00                	push   $0x0
  pushl $57
  10226e:	6a 39                	push   $0x39
  jmp __alltraps
  102270:	e9 e2 fd ff ff       	jmp    102057 <__alltraps>

00102275 <vector58>:
.globl vector58
vector58:
  pushl $0
  102275:	6a 00                	push   $0x0
  pushl $58
  102277:	6a 3a                	push   $0x3a
  jmp __alltraps
  102279:	e9 d9 fd ff ff       	jmp    102057 <__alltraps>

0010227e <vector59>:
.globl vector59
vector59:
  pushl $0
  10227e:	6a 00                	push   $0x0
  pushl $59
  102280:	6a 3b                	push   $0x3b
  jmp __alltraps
  102282:	e9 d0 fd ff ff       	jmp    102057 <__alltraps>

00102287 <vector60>:
.globl vector60
vector60:
  pushl $0
  102287:	6a 00                	push   $0x0
  pushl $60
  102289:	6a 3c                	push   $0x3c
  jmp __alltraps
  10228b:	e9 c7 fd ff ff       	jmp    102057 <__alltraps>

00102290 <vector61>:
.globl vector61
vector61:
  pushl $0
  102290:	6a 00                	push   $0x0
  pushl $61
  102292:	6a 3d                	push   $0x3d
  jmp __alltraps
  102294:	e9 be fd ff ff       	jmp    102057 <__alltraps>

00102299 <vector62>:
.globl vector62
vector62:
  pushl $0
  102299:	6a 00                	push   $0x0
  pushl $62
  10229b:	6a 3e                	push   $0x3e
  jmp __alltraps
  10229d:	e9 b5 fd ff ff       	jmp    102057 <__alltraps>

001022a2 <vector63>:
.globl vector63
vector63:
  pushl $0
  1022a2:	6a 00                	push   $0x0
  pushl $63
  1022a4:	6a 3f                	push   $0x3f
  jmp __alltraps
  1022a6:	e9 ac fd ff ff       	jmp    102057 <__alltraps>

001022ab <vector64>:
.globl vector64
vector64:
  pushl $0
  1022ab:	6a 00                	push   $0x0
  pushl $64
  1022ad:	6a 40                	push   $0x40
  jmp __alltraps
  1022af:	e9 a3 fd ff ff       	jmp    102057 <__alltraps>

001022b4 <vector65>:
.globl vector65
vector65:
  pushl $0
  1022b4:	6a 00                	push   $0x0
  pushl $65
  1022b6:	6a 41                	push   $0x41
  jmp __alltraps
  1022b8:	e9 9a fd ff ff       	jmp    102057 <__alltraps>

001022bd <vector66>:
.globl vector66
vector66:
  pushl $0
  1022bd:	6a 00                	push   $0x0
  pushl $66
  1022bf:	6a 42                	push   $0x42
  jmp __alltraps
  1022c1:	e9 91 fd ff ff       	jmp    102057 <__alltraps>

001022c6 <vector67>:
.globl vector67
vector67:
  pushl $0
  1022c6:	6a 00                	push   $0x0
  pushl $67
  1022c8:	6a 43                	push   $0x43
  jmp __alltraps
  1022ca:	e9 88 fd ff ff       	jmp    102057 <__alltraps>

001022cf <vector68>:
.globl vector68
vector68:
  pushl $0
  1022cf:	6a 00                	push   $0x0
  pushl $68
  1022d1:	6a 44                	push   $0x44
  jmp __alltraps
  1022d3:	e9 7f fd ff ff       	jmp    102057 <__alltraps>

001022d8 <vector69>:
.globl vector69
vector69:
  pushl $0
  1022d8:	6a 00                	push   $0x0
  pushl $69
  1022da:	6a 45                	push   $0x45
  jmp __alltraps
  1022dc:	e9 76 fd ff ff       	jmp    102057 <__alltraps>

001022e1 <vector70>:
.globl vector70
vector70:
  pushl $0
  1022e1:	6a 00                	push   $0x0
  pushl $70
  1022e3:	6a 46                	push   $0x46
  jmp __alltraps
  1022e5:	e9 6d fd ff ff       	jmp    102057 <__alltraps>

001022ea <vector71>:
.globl vector71
vector71:
  pushl $0
  1022ea:	6a 00                	push   $0x0
  pushl $71
  1022ec:	6a 47                	push   $0x47
  jmp __alltraps
  1022ee:	e9 64 fd ff ff       	jmp    102057 <__alltraps>

001022f3 <vector72>:
.globl vector72
vector72:
  pushl $0
  1022f3:	6a 00                	push   $0x0
  pushl $72
  1022f5:	6a 48                	push   $0x48
  jmp __alltraps
  1022f7:	e9 5b fd ff ff       	jmp    102057 <__alltraps>

001022fc <vector73>:
.globl vector73
vector73:
  pushl $0
  1022fc:	6a 00                	push   $0x0
  pushl $73
  1022fe:	6a 49                	push   $0x49
  jmp __alltraps
  102300:	e9 52 fd ff ff       	jmp    102057 <__alltraps>

00102305 <vector74>:
.globl vector74
vector74:
  pushl $0
  102305:	6a 00                	push   $0x0
  pushl $74
  102307:	6a 4a                	push   $0x4a
  jmp __alltraps
  102309:	e9 49 fd ff ff       	jmp    102057 <__alltraps>

0010230e <vector75>:
.globl vector75
vector75:
  pushl $0
  10230e:	6a 00                	push   $0x0
  pushl $75
  102310:	6a 4b                	push   $0x4b
  jmp __alltraps
  102312:	e9 40 fd ff ff       	jmp    102057 <__alltraps>

00102317 <vector76>:
.globl vector76
vector76:
  pushl $0
  102317:	6a 00                	push   $0x0
  pushl $76
  102319:	6a 4c                	push   $0x4c
  jmp __alltraps
  10231b:	e9 37 fd ff ff       	jmp    102057 <__alltraps>

00102320 <vector77>:
.globl vector77
vector77:
  pushl $0
  102320:	6a 00                	push   $0x0
  pushl $77
  102322:	6a 4d                	push   $0x4d
  jmp __alltraps
  102324:	e9 2e fd ff ff       	jmp    102057 <__alltraps>

00102329 <vector78>:
.globl vector78
vector78:
  pushl $0
  102329:	6a 00                	push   $0x0
  pushl $78
  10232b:	6a 4e                	push   $0x4e
  jmp __alltraps
  10232d:	e9 25 fd ff ff       	jmp    102057 <__alltraps>

00102332 <vector79>:
.globl vector79
vector79:
  pushl $0
  102332:	6a 00                	push   $0x0
  pushl $79
  102334:	6a 4f                	push   $0x4f
  jmp __alltraps
  102336:	e9 1c fd ff ff       	jmp    102057 <__alltraps>

0010233b <vector80>:
.globl vector80
vector80:
  pushl $0
  10233b:	6a 00                	push   $0x0
  pushl $80
  10233d:	6a 50                	push   $0x50
  jmp __alltraps
  10233f:	e9 13 fd ff ff       	jmp    102057 <__alltraps>

00102344 <vector81>:
.globl vector81
vector81:
  pushl $0
  102344:	6a 00                	push   $0x0
  pushl $81
  102346:	6a 51                	push   $0x51
  jmp __alltraps
  102348:	e9 0a fd ff ff       	jmp    102057 <__alltraps>

0010234d <vector82>:
.globl vector82
vector82:
  pushl $0
  10234d:	6a 00                	push   $0x0
  pushl $82
  10234f:	6a 52                	push   $0x52
  jmp __alltraps
  102351:	e9 01 fd ff ff       	jmp    102057 <__alltraps>

00102356 <vector83>:
.globl vector83
vector83:
  pushl $0
  102356:	6a 00                	push   $0x0
  pushl $83
  102358:	6a 53                	push   $0x53
  jmp __alltraps
  10235a:	e9 f8 fc ff ff       	jmp    102057 <__alltraps>

0010235f <vector84>:
.globl vector84
vector84:
  pushl $0
  10235f:	6a 00                	push   $0x0
  pushl $84
  102361:	6a 54                	push   $0x54
  jmp __alltraps
  102363:	e9 ef fc ff ff       	jmp    102057 <__alltraps>

00102368 <vector85>:
.globl vector85
vector85:
  pushl $0
  102368:	6a 00                	push   $0x0
  pushl $85
  10236a:	6a 55                	push   $0x55
  jmp __alltraps
  10236c:	e9 e6 fc ff ff       	jmp    102057 <__alltraps>

00102371 <vector86>:
.globl vector86
vector86:
  pushl $0
  102371:	6a 00                	push   $0x0
  pushl $86
  102373:	6a 56                	push   $0x56
  jmp __alltraps
  102375:	e9 dd fc ff ff       	jmp    102057 <__alltraps>

0010237a <vector87>:
.globl vector87
vector87:
  pushl $0
  10237a:	6a 00                	push   $0x0
  pushl $87
  10237c:	6a 57                	push   $0x57
  jmp __alltraps
  10237e:	e9 d4 fc ff ff       	jmp    102057 <__alltraps>

00102383 <vector88>:
.globl vector88
vector88:
  pushl $0
  102383:	6a 00                	push   $0x0
  pushl $88
  102385:	6a 58                	push   $0x58
  jmp __alltraps
  102387:	e9 cb fc ff ff       	jmp    102057 <__alltraps>

0010238c <vector89>:
.globl vector89
vector89:
  pushl $0
  10238c:	6a 00                	push   $0x0
  pushl $89
  10238e:	6a 59                	push   $0x59
  jmp __alltraps
  102390:	e9 c2 fc ff ff       	jmp    102057 <__alltraps>

00102395 <vector90>:
.globl vector90
vector90:
  pushl $0
  102395:	6a 00                	push   $0x0
  pushl $90
  102397:	6a 5a                	push   $0x5a
  jmp __alltraps
  102399:	e9 b9 fc ff ff       	jmp    102057 <__alltraps>

0010239e <vector91>:
.globl vector91
vector91:
  pushl $0
  10239e:	6a 00                	push   $0x0
  pushl $91
  1023a0:	6a 5b                	push   $0x5b
  jmp __alltraps
  1023a2:	e9 b0 fc ff ff       	jmp    102057 <__alltraps>

001023a7 <vector92>:
.globl vector92
vector92:
  pushl $0
  1023a7:	6a 00                	push   $0x0
  pushl $92
  1023a9:	6a 5c                	push   $0x5c
  jmp __alltraps
  1023ab:	e9 a7 fc ff ff       	jmp    102057 <__alltraps>

001023b0 <vector93>:
.globl vector93
vector93:
  pushl $0
  1023b0:	6a 00                	push   $0x0
  pushl $93
  1023b2:	6a 5d                	push   $0x5d
  jmp __alltraps
  1023b4:	e9 9e fc ff ff       	jmp    102057 <__alltraps>

001023b9 <vector94>:
.globl vector94
vector94:
  pushl $0
  1023b9:	6a 00                	push   $0x0
  pushl $94
  1023bb:	6a 5e                	push   $0x5e
  jmp __alltraps
  1023bd:	e9 95 fc ff ff       	jmp    102057 <__alltraps>

001023c2 <vector95>:
.globl vector95
vector95:
  pushl $0
  1023c2:	6a 00                	push   $0x0
  pushl $95
  1023c4:	6a 5f                	push   $0x5f
  jmp __alltraps
  1023c6:	e9 8c fc ff ff       	jmp    102057 <__alltraps>

001023cb <vector96>:
.globl vector96
vector96:
  pushl $0
  1023cb:	6a 00                	push   $0x0
  pushl $96
  1023cd:	6a 60                	push   $0x60
  jmp __alltraps
  1023cf:	e9 83 fc ff ff       	jmp    102057 <__alltraps>

001023d4 <vector97>:
.globl vector97
vector97:
  pushl $0
  1023d4:	6a 00                	push   $0x0
  pushl $97
  1023d6:	6a 61                	push   $0x61
  jmp __alltraps
  1023d8:	e9 7a fc ff ff       	jmp    102057 <__alltraps>

001023dd <vector98>:
.globl vector98
vector98:
  pushl $0
  1023dd:	6a 00                	push   $0x0
  pushl $98
  1023df:	6a 62                	push   $0x62
  jmp __alltraps
  1023e1:	e9 71 fc ff ff       	jmp    102057 <__alltraps>

001023e6 <vector99>:
.globl vector99
vector99:
  pushl $0
  1023e6:	6a 00                	push   $0x0
  pushl $99
  1023e8:	6a 63                	push   $0x63
  jmp __alltraps
  1023ea:	e9 68 fc ff ff       	jmp    102057 <__alltraps>

001023ef <vector100>:
.globl vector100
vector100:
  pushl $0
  1023ef:	6a 00                	push   $0x0
  pushl $100
  1023f1:	6a 64                	push   $0x64
  jmp __alltraps
  1023f3:	e9 5f fc ff ff       	jmp    102057 <__alltraps>

001023f8 <vector101>:
.globl vector101
vector101:
  pushl $0
  1023f8:	6a 00                	push   $0x0
  pushl $101
  1023fa:	6a 65                	push   $0x65
  jmp __alltraps
  1023fc:	e9 56 fc ff ff       	jmp    102057 <__alltraps>

00102401 <vector102>:
.globl vector102
vector102:
  pushl $0
  102401:	6a 00                	push   $0x0
  pushl $102
  102403:	6a 66                	push   $0x66
  jmp __alltraps
  102405:	e9 4d fc ff ff       	jmp    102057 <__alltraps>

0010240a <vector103>:
.globl vector103
vector103:
  pushl $0
  10240a:	6a 00                	push   $0x0
  pushl $103
  10240c:	6a 67                	push   $0x67
  jmp __alltraps
  10240e:	e9 44 fc ff ff       	jmp    102057 <__alltraps>

00102413 <vector104>:
.globl vector104
vector104:
  pushl $0
  102413:	6a 00                	push   $0x0
  pushl $104
  102415:	6a 68                	push   $0x68
  jmp __alltraps
  102417:	e9 3b fc ff ff       	jmp    102057 <__alltraps>

0010241c <vector105>:
.globl vector105
vector105:
  pushl $0
  10241c:	6a 00                	push   $0x0
  pushl $105
  10241e:	6a 69                	push   $0x69
  jmp __alltraps
  102420:	e9 32 fc ff ff       	jmp    102057 <__alltraps>

00102425 <vector106>:
.globl vector106
vector106:
  pushl $0
  102425:	6a 00                	push   $0x0
  pushl $106
  102427:	6a 6a                	push   $0x6a
  jmp __alltraps
  102429:	e9 29 fc ff ff       	jmp    102057 <__alltraps>

0010242e <vector107>:
.globl vector107
vector107:
  pushl $0
  10242e:	6a 00                	push   $0x0
  pushl $107
  102430:	6a 6b                	push   $0x6b
  jmp __alltraps
  102432:	e9 20 fc ff ff       	jmp    102057 <__alltraps>

00102437 <vector108>:
.globl vector108
vector108:
  pushl $0
  102437:	6a 00                	push   $0x0
  pushl $108
  102439:	6a 6c                	push   $0x6c
  jmp __alltraps
  10243b:	e9 17 fc ff ff       	jmp    102057 <__alltraps>

00102440 <vector109>:
.globl vector109
vector109:
  pushl $0
  102440:	6a 00                	push   $0x0
  pushl $109
  102442:	6a 6d                	push   $0x6d
  jmp __alltraps
  102444:	e9 0e fc ff ff       	jmp    102057 <__alltraps>

00102449 <vector110>:
.globl vector110
vector110:
  pushl $0
  102449:	6a 00                	push   $0x0
  pushl $110
  10244b:	6a 6e                	push   $0x6e
  jmp __alltraps
  10244d:	e9 05 fc ff ff       	jmp    102057 <__alltraps>

00102452 <vector111>:
.globl vector111
vector111:
  pushl $0
  102452:	6a 00                	push   $0x0
  pushl $111
  102454:	6a 6f                	push   $0x6f
  jmp __alltraps
  102456:	e9 fc fb ff ff       	jmp    102057 <__alltraps>

0010245b <vector112>:
.globl vector112
vector112:
  pushl $0
  10245b:	6a 00                	push   $0x0
  pushl $112
  10245d:	6a 70                	push   $0x70
  jmp __alltraps
  10245f:	e9 f3 fb ff ff       	jmp    102057 <__alltraps>

00102464 <vector113>:
.globl vector113
vector113:
  pushl $0
  102464:	6a 00                	push   $0x0
  pushl $113
  102466:	6a 71                	push   $0x71
  jmp __alltraps
  102468:	e9 ea fb ff ff       	jmp    102057 <__alltraps>

0010246d <vector114>:
.globl vector114
vector114:
  pushl $0
  10246d:	6a 00                	push   $0x0
  pushl $114
  10246f:	6a 72                	push   $0x72
  jmp __alltraps
  102471:	e9 e1 fb ff ff       	jmp    102057 <__alltraps>

00102476 <vector115>:
.globl vector115
vector115:
  pushl $0
  102476:	6a 00                	push   $0x0
  pushl $115
  102478:	6a 73                	push   $0x73
  jmp __alltraps
  10247a:	e9 d8 fb ff ff       	jmp    102057 <__alltraps>

0010247f <vector116>:
.globl vector116
vector116:
  pushl $0
  10247f:	6a 00                	push   $0x0
  pushl $116
  102481:	6a 74                	push   $0x74
  jmp __alltraps
  102483:	e9 cf fb ff ff       	jmp    102057 <__alltraps>

00102488 <vector117>:
.globl vector117
vector117:
  pushl $0
  102488:	6a 00                	push   $0x0
  pushl $117
  10248a:	6a 75                	push   $0x75
  jmp __alltraps
  10248c:	e9 c6 fb ff ff       	jmp    102057 <__alltraps>

00102491 <vector118>:
.globl vector118
vector118:
  pushl $0
  102491:	6a 00                	push   $0x0
  pushl $118
  102493:	6a 76                	push   $0x76
  jmp __alltraps
  102495:	e9 bd fb ff ff       	jmp    102057 <__alltraps>

0010249a <vector119>:
.globl vector119
vector119:
  pushl $0
  10249a:	6a 00                	push   $0x0
  pushl $119
  10249c:	6a 77                	push   $0x77
  jmp __alltraps
  10249e:	e9 b4 fb ff ff       	jmp    102057 <__alltraps>

001024a3 <vector120>:
.globl vector120
vector120:
  pushl $0
  1024a3:	6a 00                	push   $0x0
  pushl $120
  1024a5:	6a 78                	push   $0x78
  jmp __alltraps
  1024a7:	e9 ab fb ff ff       	jmp    102057 <__alltraps>

001024ac <vector121>:
.globl vector121
vector121:
  pushl $0
  1024ac:	6a 00                	push   $0x0
  pushl $121
  1024ae:	6a 79                	push   $0x79
  jmp __alltraps
  1024b0:	e9 a2 fb ff ff       	jmp    102057 <__alltraps>

001024b5 <vector122>:
.globl vector122
vector122:
  pushl $0
  1024b5:	6a 00                	push   $0x0
  pushl $122
  1024b7:	6a 7a                	push   $0x7a
  jmp __alltraps
  1024b9:	e9 99 fb ff ff       	jmp    102057 <__alltraps>

001024be <vector123>:
.globl vector123
vector123:
  pushl $0
  1024be:	6a 00                	push   $0x0
  pushl $123
  1024c0:	6a 7b                	push   $0x7b
  jmp __alltraps
  1024c2:	e9 90 fb ff ff       	jmp    102057 <__alltraps>

001024c7 <vector124>:
.globl vector124
vector124:
  pushl $0
  1024c7:	6a 00                	push   $0x0
  pushl $124
  1024c9:	6a 7c                	push   $0x7c
  jmp __alltraps
  1024cb:	e9 87 fb ff ff       	jmp    102057 <__alltraps>

001024d0 <vector125>:
.globl vector125
vector125:
  pushl $0
  1024d0:	6a 00                	push   $0x0
  pushl $125
  1024d2:	6a 7d                	push   $0x7d
  jmp __alltraps
  1024d4:	e9 7e fb ff ff       	jmp    102057 <__alltraps>

001024d9 <vector126>:
.globl vector126
vector126:
  pushl $0
  1024d9:	6a 00                	push   $0x0
  pushl $126
  1024db:	6a 7e                	push   $0x7e
  jmp __alltraps
  1024dd:	e9 75 fb ff ff       	jmp    102057 <__alltraps>

001024e2 <vector127>:
.globl vector127
vector127:
  pushl $0
  1024e2:	6a 00                	push   $0x0
  pushl $127
  1024e4:	6a 7f                	push   $0x7f
  jmp __alltraps
  1024e6:	e9 6c fb ff ff       	jmp    102057 <__alltraps>

001024eb <vector128>:
.globl vector128
vector128:
  pushl $0
  1024eb:	6a 00                	push   $0x0
  pushl $128
  1024ed:	68 80 00 00 00       	push   $0x80
  jmp __alltraps
  1024f2:	e9 60 fb ff ff       	jmp    102057 <__alltraps>

001024f7 <vector129>:
.globl vector129
vector129:
  pushl $0
  1024f7:	6a 00                	push   $0x0
  pushl $129
  1024f9:	68 81 00 00 00       	push   $0x81
  jmp __alltraps
  1024fe:	e9 54 fb ff ff       	jmp    102057 <__alltraps>

00102503 <vector130>:
.globl vector130
vector130:
  pushl $0
  102503:	6a 00                	push   $0x0
  pushl $130
  102505:	68 82 00 00 00       	push   $0x82
  jmp __alltraps
  10250a:	e9 48 fb ff ff       	jmp    102057 <__alltraps>

0010250f <vector131>:
.globl vector131
vector131:
  pushl $0
  10250f:	6a 00                	push   $0x0
  pushl $131
  102511:	68 83 00 00 00       	push   $0x83
  jmp __alltraps
  102516:	e9 3c fb ff ff       	jmp    102057 <__alltraps>

0010251b <vector132>:
.globl vector132
vector132:
  pushl $0
  10251b:	6a 00                	push   $0x0
  pushl $132
  10251d:	68 84 00 00 00       	push   $0x84
  jmp __alltraps
  102522:	e9 30 fb ff ff       	jmp    102057 <__alltraps>

00102527 <vector133>:
.globl vector133
vector133:
  pushl $0
  102527:	6a 00                	push   $0x0
  pushl $133
  102529:	68 85 00 00 00       	push   $0x85
  jmp __alltraps
  10252e:	e9 24 fb ff ff       	jmp    102057 <__alltraps>

00102533 <vector134>:
.globl vector134
vector134:
  pushl $0
  102533:	6a 00                	push   $0x0
  pushl $134
  102535:	68 86 00 00 00       	push   $0x86
  jmp __alltraps
  10253a:	e9 18 fb ff ff       	jmp    102057 <__alltraps>

0010253f <vector135>:
.globl vector135
vector135:
  pushl $0
  10253f:	6a 00                	push   $0x0
  pushl $135
  102541:	68 87 00 00 00       	push   $0x87
  jmp __alltraps
  102546:	e9 0c fb ff ff       	jmp    102057 <__alltraps>

0010254b <vector136>:
.globl vector136
vector136:
  pushl $0
  10254b:	6a 00                	push   $0x0
  pushl $136
  10254d:	68 88 00 00 00       	push   $0x88
  jmp __alltraps
  102552:	e9 00 fb ff ff       	jmp    102057 <__alltraps>

00102557 <vector137>:
.globl vector137
vector137:
  pushl $0
  102557:	6a 00                	push   $0x0
  pushl $137
  102559:	68 89 00 00 00       	push   $0x89
  jmp __alltraps
  10255e:	e9 f4 fa ff ff       	jmp    102057 <__alltraps>

00102563 <vector138>:
.globl vector138
vector138:
  pushl $0
  102563:	6a 00                	push   $0x0
  pushl $138
  102565:	68 8a 00 00 00       	push   $0x8a
  jmp __alltraps
  10256a:	e9 e8 fa ff ff       	jmp    102057 <__alltraps>

0010256f <vector139>:
.globl vector139
vector139:
  pushl $0
  10256f:	6a 00                	push   $0x0
  pushl $139
  102571:	68 8b 00 00 00       	push   $0x8b
  jmp __alltraps
  102576:	e9 dc fa ff ff       	jmp    102057 <__alltraps>

0010257b <vector140>:
.globl vector140
vector140:
  pushl $0
  10257b:	6a 00                	push   $0x0
  pushl $140
  10257d:	68 8c 00 00 00       	push   $0x8c
  jmp __alltraps
  102582:	e9 d0 fa ff ff       	jmp    102057 <__alltraps>

00102587 <vector141>:
.globl vector141
vector141:
  pushl $0
  102587:	6a 00                	push   $0x0
  pushl $141
  102589:	68 8d 00 00 00       	push   $0x8d
  jmp __alltraps
  10258e:	e9 c4 fa ff ff       	jmp    102057 <__alltraps>

00102593 <vector142>:
.globl vector142
vector142:
  pushl $0
  102593:	6a 00                	push   $0x0
  pushl $142
  102595:	68 8e 00 00 00       	push   $0x8e
  jmp __alltraps
  10259a:	e9 b8 fa ff ff       	jmp    102057 <__alltraps>

0010259f <vector143>:
.globl vector143
vector143:
  pushl $0
  10259f:	6a 00                	push   $0x0
  pushl $143
  1025a1:	68 8f 00 00 00       	push   $0x8f
  jmp __alltraps
  1025a6:	e9 ac fa ff ff       	jmp    102057 <__alltraps>

001025ab <vector144>:
.globl vector144
vector144:
  pushl $0
  1025ab:	6a 00                	push   $0x0
  pushl $144
  1025ad:	68 90 00 00 00       	push   $0x90
  jmp __alltraps
  1025b2:	e9 a0 fa ff ff       	jmp    102057 <__alltraps>

001025b7 <vector145>:
.globl vector145
vector145:
  pushl $0
  1025b7:	6a 00                	push   $0x0
  pushl $145
  1025b9:	68 91 00 00 00       	push   $0x91
  jmp __alltraps
  1025be:	e9 94 fa ff ff       	jmp    102057 <__alltraps>

001025c3 <vector146>:
.globl vector146
vector146:
  pushl $0
  1025c3:	6a 00                	push   $0x0
  pushl $146
  1025c5:	68 92 00 00 00       	push   $0x92
  jmp __alltraps
  1025ca:	e9 88 fa ff ff       	jmp    102057 <__alltraps>

001025cf <vector147>:
.globl vector147
vector147:
  pushl $0
  1025cf:	6a 00                	push   $0x0
  pushl $147
  1025d1:	68 93 00 00 00       	push   $0x93
  jmp __alltraps
  1025d6:	e9 7c fa ff ff       	jmp    102057 <__alltraps>

001025db <vector148>:
.globl vector148
vector148:
  pushl $0
  1025db:	6a 00                	push   $0x0
  pushl $148
  1025dd:	68 94 00 00 00       	push   $0x94
  jmp __alltraps
  1025e2:	e9 70 fa ff ff       	jmp    102057 <__alltraps>

001025e7 <vector149>:
.globl vector149
vector149:
  pushl $0
  1025e7:	6a 00                	push   $0x0
  pushl $149
  1025e9:	68 95 00 00 00       	push   $0x95
  jmp __alltraps
  1025ee:	e9 64 fa ff ff       	jmp    102057 <__alltraps>

001025f3 <vector150>:
.globl vector150
vector150:
  pushl $0
  1025f3:	6a 00                	push   $0x0
  pushl $150
  1025f5:	68 96 00 00 00       	push   $0x96
  jmp __alltraps
  1025fa:	e9 58 fa ff ff       	jmp    102057 <__alltraps>

001025ff <vector151>:
.globl vector151
vector151:
  pushl $0
  1025ff:	6a 00                	push   $0x0
  pushl $151
  102601:	68 97 00 00 00       	push   $0x97
  jmp __alltraps
  102606:	e9 4c fa ff ff       	jmp    102057 <__alltraps>

0010260b <vector152>:
.globl vector152
vector152:
  pushl $0
  10260b:	6a 00                	push   $0x0
  pushl $152
  10260d:	68 98 00 00 00       	push   $0x98
  jmp __alltraps
  102612:	e9 40 fa ff ff       	jmp    102057 <__alltraps>

00102617 <vector153>:
.globl vector153
vector153:
  pushl $0
  102617:	6a 00                	push   $0x0
  pushl $153
  102619:	68 99 00 00 00       	push   $0x99
  jmp __alltraps
  10261e:	e9 34 fa ff ff       	jmp    102057 <__alltraps>

00102623 <vector154>:
.globl vector154
vector154:
  pushl $0
  102623:	6a 00                	push   $0x0
  pushl $154
  102625:	68 9a 00 00 00       	push   $0x9a
  jmp __alltraps
  10262a:	e9 28 fa ff ff       	jmp    102057 <__alltraps>

0010262f <vector155>:
.globl vector155
vector155:
  pushl $0
  10262f:	6a 00                	push   $0x0
  pushl $155
  102631:	68 9b 00 00 00       	push   $0x9b
  jmp __alltraps
  102636:	e9 1c fa ff ff       	jmp    102057 <__alltraps>

0010263b <vector156>:
.globl vector156
vector156:
  pushl $0
  10263b:	6a 00                	push   $0x0
  pushl $156
  10263d:	68 9c 00 00 00       	push   $0x9c
  jmp __alltraps
  102642:	e9 10 fa ff ff       	jmp    102057 <__alltraps>

00102647 <vector157>:
.globl vector157
vector157:
  pushl $0
  102647:	6a 00                	push   $0x0
  pushl $157
  102649:	68 9d 00 00 00       	push   $0x9d
  jmp __alltraps
  10264e:	e9 04 fa ff ff       	jmp    102057 <__alltraps>

00102653 <vector158>:
.globl vector158
vector158:
  pushl $0
  102653:	6a 00                	push   $0x0
  pushl $158
  102655:	68 9e 00 00 00       	push   $0x9e
  jmp __alltraps
  10265a:	e9 f8 f9 ff ff       	jmp    102057 <__alltraps>

0010265f <vector159>:
.globl vector159
vector159:
  pushl $0
  10265f:	6a 00                	push   $0x0
  pushl $159
  102661:	68 9f 00 00 00       	push   $0x9f
  jmp __alltraps
  102666:	e9 ec f9 ff ff       	jmp    102057 <__alltraps>

0010266b <vector160>:
.globl vector160
vector160:
  pushl $0
  10266b:	6a 00                	push   $0x0
  pushl $160
  10266d:	68 a0 00 00 00       	push   $0xa0
  jmp __alltraps
  102672:	e9 e0 f9 ff ff       	jmp    102057 <__alltraps>

00102677 <vector161>:
.globl vector161
vector161:
  pushl $0
  102677:	6a 00                	push   $0x0
  pushl $161
  102679:	68 a1 00 00 00       	push   $0xa1
  jmp __alltraps
  10267e:	e9 d4 f9 ff ff       	jmp    102057 <__alltraps>

00102683 <vector162>:
.globl vector162
vector162:
  pushl $0
  102683:	6a 00                	push   $0x0
  pushl $162
  102685:	68 a2 00 00 00       	push   $0xa2
  jmp __alltraps
  10268a:	e9 c8 f9 ff ff       	jmp    102057 <__alltraps>

0010268f <vector163>:
.globl vector163
vector163:
  pushl $0
  10268f:	6a 00                	push   $0x0
  pushl $163
  102691:	68 a3 00 00 00       	push   $0xa3
  jmp __alltraps
  102696:	e9 bc f9 ff ff       	jmp    102057 <__alltraps>

0010269b <vector164>:
.globl vector164
vector164:
  pushl $0
  10269b:	6a 00                	push   $0x0
  pushl $164
  10269d:	68 a4 00 00 00       	push   $0xa4
  jmp __alltraps
  1026a2:	e9 b0 f9 ff ff       	jmp    102057 <__alltraps>

001026a7 <vector165>:
.globl vector165
vector165:
  pushl $0
  1026a7:	6a 00                	push   $0x0
  pushl $165
  1026a9:	68 a5 00 00 00       	push   $0xa5
  jmp __alltraps
  1026ae:	e9 a4 f9 ff ff       	jmp    102057 <__alltraps>

001026b3 <vector166>:
.globl vector166
vector166:
  pushl $0
  1026b3:	6a 00                	push   $0x0
  pushl $166
  1026b5:	68 a6 00 00 00       	push   $0xa6
  jmp __alltraps
  1026ba:	e9 98 f9 ff ff       	jmp    102057 <__alltraps>

001026bf <vector167>:
.globl vector167
vector167:
  pushl $0
  1026bf:	6a 00                	push   $0x0
  pushl $167
  1026c1:	68 a7 00 00 00       	push   $0xa7
  jmp __alltraps
  1026c6:	e9 8c f9 ff ff       	jmp    102057 <__alltraps>

001026cb <vector168>:
.globl vector168
vector168:
  pushl $0
  1026cb:	6a 00                	push   $0x0
  pushl $168
  1026cd:	68 a8 00 00 00       	push   $0xa8
  jmp __alltraps
  1026d2:	e9 80 f9 ff ff       	jmp    102057 <__alltraps>

001026d7 <vector169>:
.globl vector169
vector169:
  pushl $0
  1026d7:	6a 00                	push   $0x0
  pushl $169
  1026d9:	68 a9 00 00 00       	push   $0xa9
  jmp __alltraps
  1026de:	e9 74 f9 ff ff       	jmp    102057 <__alltraps>

001026e3 <vector170>:
.globl vector170
vector170:
  pushl $0
  1026e3:	6a 00                	push   $0x0
  pushl $170
  1026e5:	68 aa 00 00 00       	push   $0xaa
  jmp __alltraps
  1026ea:	e9 68 f9 ff ff       	jmp    102057 <__alltraps>

001026ef <vector171>:
.globl vector171
vector171:
  pushl $0
  1026ef:	6a 00                	push   $0x0
  pushl $171
  1026f1:	68 ab 00 00 00       	push   $0xab
  jmp __alltraps
  1026f6:	e9 5c f9 ff ff       	jmp    102057 <__alltraps>

001026fb <vector172>:
.globl vector172
vector172:
  pushl $0
  1026fb:	6a 00                	push   $0x0
  pushl $172
  1026fd:	68 ac 00 00 00       	push   $0xac
  jmp __alltraps
  102702:	e9 50 f9 ff ff       	jmp    102057 <__alltraps>

00102707 <vector173>:
.globl vector173
vector173:
  pushl $0
  102707:	6a 00                	push   $0x0
  pushl $173
  102709:	68 ad 00 00 00       	push   $0xad
  jmp __alltraps
  10270e:	e9 44 f9 ff ff       	jmp    102057 <__alltraps>

00102713 <vector174>:
.globl vector174
vector174:
  pushl $0
  102713:	6a 00                	push   $0x0
  pushl $174
  102715:	68 ae 00 00 00       	push   $0xae
  jmp __alltraps
  10271a:	e9 38 f9 ff ff       	jmp    102057 <__alltraps>

0010271f <vector175>:
.globl vector175
vector175:
  pushl $0
  10271f:	6a 00                	push   $0x0
  pushl $175
  102721:	68 af 00 00 00       	push   $0xaf
  jmp __alltraps
  102726:	e9 2c f9 ff ff       	jmp    102057 <__alltraps>

0010272b <vector176>:
.globl vector176
vector176:
  pushl $0
  10272b:	6a 00                	push   $0x0
  pushl $176
  10272d:	68 b0 00 00 00       	push   $0xb0
  jmp __alltraps
  102732:	e9 20 f9 ff ff       	jmp    102057 <__alltraps>

00102737 <vector177>:
.globl vector177
vector177:
  pushl $0
  102737:	6a 00                	push   $0x0
  pushl $177
  102739:	68 b1 00 00 00       	push   $0xb1
  jmp __alltraps
  10273e:	e9 14 f9 ff ff       	jmp    102057 <__alltraps>

00102743 <vector178>:
.globl vector178
vector178:
  pushl $0
  102743:	6a 00                	push   $0x0
  pushl $178
  102745:	68 b2 00 00 00       	push   $0xb2
  jmp __alltraps
  10274a:	e9 08 f9 ff ff       	jmp    102057 <__alltraps>

0010274f <vector179>:
.globl vector179
vector179:
  pushl $0
  10274f:	6a 00                	push   $0x0
  pushl $179
  102751:	68 b3 00 00 00       	push   $0xb3
  jmp __alltraps
  102756:	e9 fc f8 ff ff       	jmp    102057 <__alltraps>

0010275b <vector180>:
.globl vector180
vector180:
  pushl $0
  10275b:	6a 00                	push   $0x0
  pushl $180
  10275d:	68 b4 00 00 00       	push   $0xb4
  jmp __alltraps
  102762:	e9 f0 f8 ff ff       	jmp    102057 <__alltraps>

00102767 <vector181>:
.globl vector181
vector181:
  pushl $0
  102767:	6a 00                	push   $0x0
  pushl $181
  102769:	68 b5 00 00 00       	push   $0xb5
  jmp __alltraps
  10276e:	e9 e4 f8 ff ff       	jmp    102057 <__alltraps>

00102773 <vector182>:
.globl vector182
vector182:
  pushl $0
  102773:	6a 00                	push   $0x0
  pushl $182
  102775:	68 b6 00 00 00       	push   $0xb6
  jmp __alltraps
  10277a:	e9 d8 f8 ff ff       	jmp    102057 <__alltraps>

0010277f <vector183>:
.globl vector183
vector183:
  pushl $0
  10277f:	6a 00                	push   $0x0
  pushl $183
  102781:	68 b7 00 00 00       	push   $0xb7
  jmp __alltraps
  102786:	e9 cc f8 ff ff       	jmp    102057 <__alltraps>

0010278b <vector184>:
.globl vector184
vector184:
  pushl $0
  10278b:	6a 00                	push   $0x0
  pushl $184
  10278d:	68 b8 00 00 00       	push   $0xb8
  jmp __alltraps
  102792:	e9 c0 f8 ff ff       	jmp    102057 <__alltraps>

00102797 <vector185>:
.globl vector185
vector185:
  pushl $0
  102797:	6a 00                	push   $0x0
  pushl $185
  102799:	68 b9 00 00 00       	push   $0xb9
  jmp __alltraps
  10279e:	e9 b4 f8 ff ff       	jmp    102057 <__alltraps>

001027a3 <vector186>:
.globl vector186
vector186:
  pushl $0
  1027a3:	6a 00                	push   $0x0
  pushl $186
  1027a5:	68 ba 00 00 00       	push   $0xba
  jmp __alltraps
  1027aa:	e9 a8 f8 ff ff       	jmp    102057 <__alltraps>

001027af <vector187>:
.globl vector187
vector187:
  pushl $0
  1027af:	6a 00                	push   $0x0
  pushl $187
  1027b1:	68 bb 00 00 00       	push   $0xbb
  jmp __alltraps
  1027b6:	e9 9c f8 ff ff       	jmp    102057 <__alltraps>

001027bb <vector188>:
.globl vector188
vector188:
  pushl $0
  1027bb:	6a 00                	push   $0x0
  pushl $188
  1027bd:	68 bc 00 00 00       	push   $0xbc
  jmp __alltraps
  1027c2:	e9 90 f8 ff ff       	jmp    102057 <__alltraps>

001027c7 <vector189>:
.globl vector189
vector189:
  pushl $0
  1027c7:	6a 00                	push   $0x0
  pushl $189
  1027c9:	68 bd 00 00 00       	push   $0xbd
  jmp __alltraps
  1027ce:	e9 84 f8 ff ff       	jmp    102057 <__alltraps>

001027d3 <vector190>:
.globl vector190
vector190:
  pushl $0
  1027d3:	6a 00                	push   $0x0
  pushl $190
  1027d5:	68 be 00 00 00       	push   $0xbe
  jmp __alltraps
  1027da:	e9 78 f8 ff ff       	jmp    102057 <__alltraps>

001027df <vector191>:
.globl vector191
vector191:
  pushl $0
  1027df:	6a 00                	push   $0x0
  pushl $191
  1027e1:	68 bf 00 00 00       	push   $0xbf
  jmp __alltraps
  1027e6:	e9 6c f8 ff ff       	jmp    102057 <__alltraps>

001027eb <vector192>:
.globl vector192
vector192:
  pushl $0
  1027eb:	6a 00                	push   $0x0
  pushl $192
  1027ed:	68 c0 00 00 00       	push   $0xc0
  jmp __alltraps
  1027f2:	e9 60 f8 ff ff       	jmp    102057 <__alltraps>

001027f7 <vector193>:
.globl vector193
vector193:
  pushl $0
  1027f7:	6a 00                	push   $0x0
  pushl $193
  1027f9:	68 c1 00 00 00       	push   $0xc1
  jmp __alltraps
  1027fe:	e9 54 f8 ff ff       	jmp    102057 <__alltraps>

00102803 <vector194>:
.globl vector194
vector194:
  pushl $0
  102803:	6a 00                	push   $0x0
  pushl $194
  102805:	68 c2 00 00 00       	push   $0xc2
  jmp __alltraps
  10280a:	e9 48 f8 ff ff       	jmp    102057 <__alltraps>

0010280f <vector195>:
.globl vector195
vector195:
  pushl $0
  10280f:	6a 00                	push   $0x0
  pushl $195
  102811:	68 c3 00 00 00       	push   $0xc3
  jmp __alltraps
  102816:	e9 3c f8 ff ff       	jmp    102057 <__alltraps>

0010281b <vector196>:
.globl vector196
vector196:
  pushl $0
  10281b:	6a 00                	push   $0x0
  pushl $196
  10281d:	68 c4 00 00 00       	push   $0xc4
  jmp __alltraps
  102822:	e9 30 f8 ff ff       	jmp    102057 <__alltraps>

00102827 <vector197>:
.globl vector197
vector197:
  pushl $0
  102827:	6a 00                	push   $0x0
  pushl $197
  102829:	68 c5 00 00 00       	push   $0xc5
  jmp __alltraps
  10282e:	e9 24 f8 ff ff       	jmp    102057 <__alltraps>

00102833 <vector198>:
.globl vector198
vector198:
  pushl $0
  102833:	6a 00                	push   $0x0
  pushl $198
  102835:	68 c6 00 00 00       	push   $0xc6
  jmp __alltraps
  10283a:	e9 18 f8 ff ff       	jmp    102057 <__alltraps>

0010283f <vector199>:
.globl vector199
vector199:
  pushl $0
  10283f:	6a 00                	push   $0x0
  pushl $199
  102841:	68 c7 00 00 00       	push   $0xc7
  jmp __alltraps
  102846:	e9 0c f8 ff ff       	jmp    102057 <__alltraps>

0010284b <vector200>:
.globl vector200
vector200:
  pushl $0
  10284b:	6a 00                	push   $0x0
  pushl $200
  10284d:	68 c8 00 00 00       	push   $0xc8
  jmp __alltraps
  102852:	e9 00 f8 ff ff       	jmp    102057 <__alltraps>

00102857 <vector201>:
.globl vector201
vector201:
  pushl $0
  102857:	6a 00                	push   $0x0
  pushl $201
  102859:	68 c9 00 00 00       	push   $0xc9
  jmp __alltraps
  10285e:	e9 f4 f7 ff ff       	jmp    102057 <__alltraps>

00102863 <vector202>:
.globl vector202
vector202:
  pushl $0
  102863:	6a 00                	push   $0x0
  pushl $202
  102865:	68 ca 00 00 00       	push   $0xca
  jmp __alltraps
  10286a:	e9 e8 f7 ff ff       	jmp    102057 <__alltraps>

0010286f <vector203>:
.globl vector203
vector203:
  pushl $0
  10286f:	6a 00                	push   $0x0
  pushl $203
  102871:	68 cb 00 00 00       	push   $0xcb
  jmp __alltraps
  102876:	e9 dc f7 ff ff       	jmp    102057 <__alltraps>

0010287b <vector204>:
.globl vector204
vector204:
  pushl $0
  10287b:	6a 00                	push   $0x0
  pushl $204
  10287d:	68 cc 00 00 00       	push   $0xcc
  jmp __alltraps
  102882:	e9 d0 f7 ff ff       	jmp    102057 <__alltraps>

00102887 <vector205>:
.globl vector205
vector205:
  pushl $0
  102887:	6a 00                	push   $0x0
  pushl $205
  102889:	68 cd 00 00 00       	push   $0xcd
  jmp __alltraps
  10288e:	e9 c4 f7 ff ff       	jmp    102057 <__alltraps>

00102893 <vector206>:
.globl vector206
vector206:
  pushl $0
  102893:	6a 00                	push   $0x0
  pushl $206
  102895:	68 ce 00 00 00       	push   $0xce
  jmp __alltraps
  10289a:	e9 b8 f7 ff ff       	jmp    102057 <__alltraps>

0010289f <vector207>:
.globl vector207
vector207:
  pushl $0
  10289f:	6a 00                	push   $0x0
  pushl $207
  1028a1:	68 cf 00 00 00       	push   $0xcf
  jmp __alltraps
  1028a6:	e9 ac f7 ff ff       	jmp    102057 <__alltraps>

001028ab <vector208>:
.globl vector208
vector208:
  pushl $0
  1028ab:	6a 00                	push   $0x0
  pushl $208
  1028ad:	68 d0 00 00 00       	push   $0xd0
  jmp __alltraps
  1028b2:	e9 a0 f7 ff ff       	jmp    102057 <__alltraps>

001028b7 <vector209>:
.globl vector209
vector209:
  pushl $0
  1028b7:	6a 00                	push   $0x0
  pushl $209
  1028b9:	68 d1 00 00 00       	push   $0xd1
  jmp __alltraps
  1028be:	e9 94 f7 ff ff       	jmp    102057 <__alltraps>

001028c3 <vector210>:
.globl vector210
vector210:
  pushl $0
  1028c3:	6a 00                	push   $0x0
  pushl $210
  1028c5:	68 d2 00 00 00       	push   $0xd2
  jmp __alltraps
  1028ca:	e9 88 f7 ff ff       	jmp    102057 <__alltraps>

001028cf <vector211>:
.globl vector211
vector211:
  pushl $0
  1028cf:	6a 00                	push   $0x0
  pushl $211
  1028d1:	68 d3 00 00 00       	push   $0xd3
  jmp __alltraps
  1028d6:	e9 7c f7 ff ff       	jmp    102057 <__alltraps>

001028db <vector212>:
.globl vector212
vector212:
  pushl $0
  1028db:	6a 00                	push   $0x0
  pushl $212
  1028dd:	68 d4 00 00 00       	push   $0xd4
  jmp __alltraps
  1028e2:	e9 70 f7 ff ff       	jmp    102057 <__alltraps>

001028e7 <vector213>:
.globl vector213
vector213:
  pushl $0
  1028e7:	6a 00                	push   $0x0
  pushl $213
  1028e9:	68 d5 00 00 00       	push   $0xd5
  jmp __alltraps
  1028ee:	e9 64 f7 ff ff       	jmp    102057 <__alltraps>

001028f3 <vector214>:
.globl vector214
vector214:
  pushl $0
  1028f3:	6a 00                	push   $0x0
  pushl $214
  1028f5:	68 d6 00 00 00       	push   $0xd6
  jmp __alltraps
  1028fa:	e9 58 f7 ff ff       	jmp    102057 <__alltraps>

001028ff <vector215>:
.globl vector215
vector215:
  pushl $0
  1028ff:	6a 00                	push   $0x0
  pushl $215
  102901:	68 d7 00 00 00       	push   $0xd7
  jmp __alltraps
  102906:	e9 4c f7 ff ff       	jmp    102057 <__alltraps>

0010290b <vector216>:
.globl vector216
vector216:
  pushl $0
  10290b:	6a 00                	push   $0x0
  pushl $216
  10290d:	68 d8 00 00 00       	push   $0xd8
  jmp __alltraps
  102912:	e9 40 f7 ff ff       	jmp    102057 <__alltraps>

00102917 <vector217>:
.globl vector217
vector217:
  pushl $0
  102917:	6a 00                	push   $0x0
  pushl $217
  102919:	68 d9 00 00 00       	push   $0xd9
  jmp __alltraps
  10291e:	e9 34 f7 ff ff       	jmp    102057 <__alltraps>

00102923 <vector218>:
.globl vector218
vector218:
  pushl $0
  102923:	6a 00                	push   $0x0
  pushl $218
  102925:	68 da 00 00 00       	push   $0xda
  jmp __alltraps
  10292a:	e9 28 f7 ff ff       	jmp    102057 <__alltraps>

0010292f <vector219>:
.globl vector219
vector219:
  pushl $0
  10292f:	6a 00                	push   $0x0
  pushl $219
  102931:	68 db 00 00 00       	push   $0xdb
  jmp __alltraps
  102936:	e9 1c f7 ff ff       	jmp    102057 <__alltraps>

0010293b <vector220>:
.globl vector220
vector220:
  pushl $0
  10293b:	6a 00                	push   $0x0
  pushl $220
  10293d:	68 dc 00 00 00       	push   $0xdc
  jmp __alltraps
  102942:	e9 10 f7 ff ff       	jmp    102057 <__alltraps>

00102947 <vector221>:
.globl vector221
vector221:
  pushl $0
  102947:	6a 00                	push   $0x0
  pushl $221
  102949:	68 dd 00 00 00       	push   $0xdd
  jmp __alltraps
  10294e:	e9 04 f7 ff ff       	jmp    102057 <__alltraps>

00102953 <vector222>:
.globl vector222
vector222:
  pushl $0
  102953:	6a 00                	push   $0x0
  pushl $222
  102955:	68 de 00 00 00       	push   $0xde
  jmp __alltraps
  10295a:	e9 f8 f6 ff ff       	jmp    102057 <__alltraps>

0010295f <vector223>:
.globl vector223
vector223:
  pushl $0
  10295f:	6a 00                	push   $0x0
  pushl $223
  102961:	68 df 00 00 00       	push   $0xdf
  jmp __alltraps
  102966:	e9 ec f6 ff ff       	jmp    102057 <__alltraps>

0010296b <vector224>:
.globl vector224
vector224:
  pushl $0
  10296b:	6a 00                	push   $0x0
  pushl $224
  10296d:	68 e0 00 00 00       	push   $0xe0
  jmp __alltraps
  102972:	e9 e0 f6 ff ff       	jmp    102057 <__alltraps>

00102977 <vector225>:
.globl vector225
vector225:
  pushl $0
  102977:	6a 00                	push   $0x0
  pushl $225
  102979:	68 e1 00 00 00       	push   $0xe1
  jmp __alltraps
  10297e:	e9 d4 f6 ff ff       	jmp    102057 <__alltraps>

00102983 <vector226>:
.globl vector226
vector226:
  pushl $0
  102983:	6a 00                	push   $0x0
  pushl $226
  102985:	68 e2 00 00 00       	push   $0xe2
  jmp __alltraps
  10298a:	e9 c8 f6 ff ff       	jmp    102057 <__alltraps>

0010298f <vector227>:
.globl vector227
vector227:
  pushl $0
  10298f:	6a 00                	push   $0x0
  pushl $227
  102991:	68 e3 00 00 00       	push   $0xe3
  jmp __alltraps
  102996:	e9 bc f6 ff ff       	jmp    102057 <__alltraps>

0010299b <vector228>:
.globl vector228
vector228:
  pushl $0
  10299b:	6a 00                	push   $0x0
  pushl $228
  10299d:	68 e4 00 00 00       	push   $0xe4
  jmp __alltraps
  1029a2:	e9 b0 f6 ff ff       	jmp    102057 <__alltraps>

001029a7 <vector229>:
.globl vector229
vector229:
  pushl $0
  1029a7:	6a 00                	push   $0x0
  pushl $229
  1029a9:	68 e5 00 00 00       	push   $0xe5
  jmp __alltraps
  1029ae:	e9 a4 f6 ff ff       	jmp    102057 <__alltraps>

001029b3 <vector230>:
.globl vector230
vector230:
  pushl $0
  1029b3:	6a 00                	push   $0x0
  pushl $230
  1029b5:	68 e6 00 00 00       	push   $0xe6
  jmp __alltraps
  1029ba:	e9 98 f6 ff ff       	jmp    102057 <__alltraps>

001029bf <vector231>:
.globl vector231
vector231:
  pushl $0
  1029bf:	6a 00                	push   $0x0
  pushl $231
  1029c1:	68 e7 00 00 00       	push   $0xe7
  jmp __alltraps
  1029c6:	e9 8c f6 ff ff       	jmp    102057 <__alltraps>

001029cb <vector232>:
.globl vector232
vector232:
  pushl $0
  1029cb:	6a 00                	push   $0x0
  pushl $232
  1029cd:	68 e8 00 00 00       	push   $0xe8
  jmp __alltraps
  1029d2:	e9 80 f6 ff ff       	jmp    102057 <__alltraps>

001029d7 <vector233>:
.globl vector233
vector233:
  pushl $0
  1029d7:	6a 00                	push   $0x0
  pushl $233
  1029d9:	68 e9 00 00 00       	push   $0xe9
  jmp __alltraps
  1029de:	e9 74 f6 ff ff       	jmp    102057 <__alltraps>

001029e3 <vector234>:
.globl vector234
vector234:
  pushl $0
  1029e3:	6a 00                	push   $0x0
  pushl $234
  1029e5:	68 ea 00 00 00       	push   $0xea
  jmp __alltraps
  1029ea:	e9 68 f6 ff ff       	jmp    102057 <__alltraps>

001029ef <vector235>:
.globl vector235
vector235:
  pushl $0
  1029ef:	6a 00                	push   $0x0
  pushl $235
  1029f1:	68 eb 00 00 00       	push   $0xeb
  jmp __alltraps
  1029f6:	e9 5c f6 ff ff       	jmp    102057 <__alltraps>

001029fb <vector236>:
.globl vector236
vector236:
  pushl $0
  1029fb:	6a 00                	push   $0x0
  pushl $236
  1029fd:	68 ec 00 00 00       	push   $0xec
  jmp __alltraps
  102a02:	e9 50 f6 ff ff       	jmp    102057 <__alltraps>

00102a07 <vector237>:
.globl vector237
vector237:
  pushl $0
  102a07:	6a 00                	push   $0x0
  pushl $237
  102a09:	68 ed 00 00 00       	push   $0xed
  jmp __alltraps
  102a0e:	e9 44 f6 ff ff       	jmp    102057 <__alltraps>

00102a13 <vector238>:
.globl vector238
vector238:
  pushl $0
  102a13:	6a 00                	push   $0x0
  pushl $238
  102a15:	68 ee 00 00 00       	push   $0xee
  jmp __alltraps
  102a1a:	e9 38 f6 ff ff       	jmp    102057 <__alltraps>

00102a1f <vector239>:
.globl vector239
vector239:
  pushl $0
  102a1f:	6a 00                	push   $0x0
  pushl $239
  102a21:	68 ef 00 00 00       	push   $0xef
  jmp __alltraps
  102a26:	e9 2c f6 ff ff       	jmp    102057 <__alltraps>

00102a2b <vector240>:
.globl vector240
vector240:
  pushl $0
  102a2b:	6a 00                	push   $0x0
  pushl $240
  102a2d:	68 f0 00 00 00       	push   $0xf0
  jmp __alltraps
  102a32:	e9 20 f6 ff ff       	jmp    102057 <__alltraps>

00102a37 <vector241>:
.globl vector241
vector241:
  pushl $0
  102a37:	6a 00                	push   $0x0
  pushl $241
  102a39:	68 f1 00 00 00       	push   $0xf1
  jmp __alltraps
  102a3e:	e9 14 f6 ff ff       	jmp    102057 <__alltraps>

00102a43 <vector242>:
.globl vector242
vector242:
  pushl $0
  102a43:	6a 00                	push   $0x0
  pushl $242
  102a45:	68 f2 00 00 00       	push   $0xf2
  jmp __alltraps
  102a4a:	e9 08 f6 ff ff       	jmp    102057 <__alltraps>

00102a4f <vector243>:
.globl vector243
vector243:
  pushl $0
  102a4f:	6a 00                	push   $0x0
  pushl $243
  102a51:	68 f3 00 00 00       	push   $0xf3
  jmp __alltraps
  102a56:	e9 fc f5 ff ff       	jmp    102057 <__alltraps>

00102a5b <vector244>:
.globl vector244
vector244:
  pushl $0
  102a5b:	6a 00                	push   $0x0
  pushl $244
  102a5d:	68 f4 00 00 00       	push   $0xf4
  jmp __alltraps
  102a62:	e9 f0 f5 ff ff       	jmp    102057 <__alltraps>

00102a67 <vector245>:
.globl vector245
vector245:
  pushl $0
  102a67:	6a 00                	push   $0x0
  pushl $245
  102a69:	68 f5 00 00 00       	push   $0xf5
  jmp __alltraps
  102a6e:	e9 e4 f5 ff ff       	jmp    102057 <__alltraps>

00102a73 <vector246>:
.globl vector246
vector246:
  pushl $0
  102a73:	6a 00                	push   $0x0
  pushl $246
  102a75:	68 f6 00 00 00       	push   $0xf6
  jmp __alltraps
  102a7a:	e9 d8 f5 ff ff       	jmp    102057 <__alltraps>

00102a7f <vector247>:
.globl vector247
vector247:
  pushl $0
  102a7f:	6a 00                	push   $0x0
  pushl $247
  102a81:	68 f7 00 00 00       	push   $0xf7
  jmp __alltraps
  102a86:	e9 cc f5 ff ff       	jmp    102057 <__alltraps>

00102a8b <vector248>:
.globl vector248
vector248:
  pushl $0
  102a8b:	6a 00                	push   $0x0
  pushl $248
  102a8d:	68 f8 00 00 00       	push   $0xf8
  jmp __alltraps
  102a92:	e9 c0 f5 ff ff       	jmp    102057 <__alltraps>

00102a97 <vector249>:
.globl vector249
vector249:
  pushl $0
  102a97:	6a 00                	push   $0x0
  pushl $249
  102a99:	68 f9 00 00 00       	push   $0xf9
  jmp __alltraps
  102a9e:	e9 b4 f5 ff ff       	jmp    102057 <__alltraps>

00102aa3 <vector250>:
.globl vector250
vector250:
  pushl $0
  102aa3:	6a 00                	push   $0x0
  pushl $250
  102aa5:	68 fa 00 00 00       	push   $0xfa
  jmp __alltraps
  102aaa:	e9 a8 f5 ff ff       	jmp    102057 <__alltraps>

00102aaf <vector251>:
.globl vector251
vector251:
  pushl $0
  102aaf:	6a 00                	push   $0x0
  pushl $251
  102ab1:	68 fb 00 00 00       	push   $0xfb
  jmp __alltraps
  102ab6:	e9 9c f5 ff ff       	jmp    102057 <__alltraps>

00102abb <vector252>:
.globl vector252
vector252:
  pushl $0
  102abb:	6a 00                	push   $0x0
  pushl $252
  102abd:	68 fc 00 00 00       	push   $0xfc
  jmp __alltraps
  102ac2:	e9 90 f5 ff ff       	jmp    102057 <__alltraps>

00102ac7 <vector253>:
.globl vector253
vector253:
  pushl $0
  102ac7:	6a 00                	push   $0x0
  pushl $253
  102ac9:	68 fd 00 00 00       	push   $0xfd
  jmp __alltraps
  102ace:	e9 84 f5 ff ff       	jmp    102057 <__alltraps>

00102ad3 <vector254>:
.globl vector254
vector254:
  pushl $0
  102ad3:	6a 00                	push   $0x0
  pushl $254
  102ad5:	68 fe 00 00 00       	push   $0xfe
  jmp __alltraps
  102ada:	e9 78 f5 ff ff       	jmp    102057 <__alltraps>

00102adf <vector255>:
.globl vector255
vector255:
  pushl $0
  102adf:	6a 00                	push   $0x0
  pushl $255
  102ae1:	68 ff 00 00 00       	push   $0xff
  jmp __alltraps
  102ae6:	e9 6c f5 ff ff       	jmp    102057 <__alltraps>

00102aeb <page2ppn>:

extern struct Page *pages;
extern size_t npage;

static inline ppn_t
page2ppn(struct Page *page) {
  102aeb:	55                   	push   %ebp
  102aec:	89 e5                	mov    %esp,%ebp
    return page - pages;
  102aee:	8b 15 c0 ce 11 00    	mov    0x11cec0,%edx
  102af4:	8b 45 08             	mov    0x8(%ebp),%eax
  102af7:	29 d0                	sub    %edx,%eax
  102af9:	c1 f8 02             	sar    $0x2,%eax
  102afc:	69 c0 cd cc cc cc    	imul   $0xcccccccd,%eax,%eax
}
  102b02:	5d                   	pop    %ebp
  102b03:	c3                   	ret    

00102b04 <page2pa>:

static inline uintptr_t
page2pa(struct Page *page) {
  102b04:	55                   	push   %ebp
  102b05:	89 e5                	mov    %esp,%ebp
  102b07:	83 ec 04             	sub    $0x4,%esp
    return page2ppn(page) << PGSHIFT;
  102b0a:	8b 45 08             	mov    0x8(%ebp),%eax
  102b0d:	89 04 24             	mov    %eax,(%esp)
  102b10:	e8 d6 ff ff ff       	call   102aeb <page2ppn>
  102b15:	c1 e0 0c             	shl    $0xc,%eax
}
  102b18:	89 ec                	mov    %ebp,%esp
  102b1a:	5d                   	pop    %ebp
  102b1b:	c3                   	ret    

00102b1c <page_ref>:
pde2page(pde_t pde) {
    return pa2page(PDE_ADDR(pde));
}

static inline int
page_ref(struct Page *page) {
  102b1c:	55                   	push   %ebp
  102b1d:	89 e5                	mov    %esp,%ebp
    return page->ref;
  102b1f:	8b 45 08             	mov    0x8(%ebp),%eax
  102b22:	8b 00                	mov    (%eax),%eax
}
  102b24:	5d                   	pop    %ebp
  102b25:	c3                   	ret    

00102b26 <set_page_ref>:

static inline void
set_page_ref(struct Page *page, int val) {
  102b26:	55                   	push   %ebp
  102b27:	89 e5                	mov    %esp,%ebp
    page->ref = val;
  102b29:	8b 45 08             	mov    0x8(%ebp),%eax
  102b2c:	8b 55 0c             	mov    0xc(%ebp),%edx
  102b2f:	89 10                	mov    %edx,(%eax)
}
  102b31:	90                   	nop
  102b32:	5d                   	pop    %ebp
  102b33:	c3                   	ret    

00102b34 <default_init>:

#define free_list (free_area.free_list)
#define nr_free (free_area.nr_free)

static void
default_init(void) {
  102b34:	55                   	push   %ebp
  102b35:	89 e5                	mov    %esp,%ebp
  102b37:	83 ec 10             	sub    $0x10,%esp
  102b3a:	c7 45 fc a8 ce 11 00 	movl   $0x11cea8,-0x4(%ebp)
 * list_init - initialize a new entry
 * @elm:        new entry to be initialized
 * */
static inline void
list_init(list_entry_t *elm) {
    elm->prev = elm->next = elm;
  102b41:	8b 45 fc             	mov    -0x4(%ebp),%eax
  102b44:	8b 55 fc             	mov    -0x4(%ebp),%edx
  102b47:	89 50 04             	mov    %edx,0x4(%eax)
  102b4a:	8b 45 fc             	mov    -0x4(%ebp),%eax
  102b4d:	8b 50 04             	mov    0x4(%eax),%edx
  102b50:	8b 45 fc             	mov    -0x4(%ebp),%eax
  102b53:	89 10                	mov    %edx,(%eax)
}
  102b55:	90                   	nop
    list_init(&free_list);
    nr_free = 0;
  102b56:	c7 05 b0 ce 11 00 00 	movl   $0x0,0x11ceb0
  102b5d:	00 00 00 
}
  102b60:	90                   	nop
  102b61:	89 ec                	mov    %ebp,%esp
  102b63:	5d                   	pop    %ebp
  102b64:	c3                   	ret    

00102b65 <default_init_memmap>:

static void
default_init_memmap(struct Page *base, size_t n) {
  102b65:	55                   	push   %ebp
  102b66:	89 e5                	mov    %esp,%ebp
  102b68:	83 ec 58             	sub    $0x58,%esp
    assert(n > 0);
  102b6b:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
  102b6f:	75 24                	jne    102b95 <default_init_memmap+0x30>
  102b71:	c7 44 24 0c 50 67 10 	movl   $0x106750,0xc(%esp)
  102b78:	00 
  102b79:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  102b80:	00 
  102b81:	c7 44 24 04 6d 00 00 	movl   $0x6d,0x4(%esp)
  102b88:	00 
  102b89:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  102b90:	e8 59 e1 ff ff       	call   100cee <__panic>
    struct Page *p = base;
  102b95:	8b 45 08             	mov    0x8(%ebp),%eax
  102b98:	89 45 f4             	mov    %eax,-0xc(%ebp)
    for (; p != base + n; p ++) {
  102b9b:	eb 7d                	jmp    102c1a <default_init_memmap+0xb5>
        assert(PageReserved(p));
  102b9d:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102ba0:	83 c0 04             	add    $0x4,%eax
  102ba3:	c7 45 f0 00 00 00 00 	movl   $0x0,-0x10(%ebp)
  102baa:	89 45 ec             	mov    %eax,-0x14(%ebp)
 * @addr:   the address to count from
 * */
static inline bool
test_bit(int nr, volatile void *addr) {
    int oldbit;
    asm volatile ("btl %2, %1; sbbl %0,%0" : "=r" (oldbit) : "m" (*(volatile long *)addr), "Ir" (nr));
  102bad:	8b 45 ec             	mov    -0x14(%ebp),%eax
  102bb0:	8b 55 f0             	mov    -0x10(%ebp),%edx
  102bb3:	0f a3 10             	bt     %edx,(%eax)
  102bb6:	19 c0                	sbb    %eax,%eax
  102bb8:	89 45 e8             	mov    %eax,-0x18(%ebp)
    return oldbit != 0;
  102bbb:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  102bbf:	0f 95 c0             	setne  %al
  102bc2:	0f b6 c0             	movzbl %al,%eax
  102bc5:	85 c0                	test   %eax,%eax
  102bc7:	75 24                	jne    102bed <default_init_memmap+0x88>
  102bc9:	c7 44 24 0c 81 67 10 	movl   $0x106781,0xc(%esp)
  102bd0:	00 
  102bd1:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  102bd8:	00 
  102bd9:	c7 44 24 04 70 00 00 	movl   $0x70,0x4(%esp)
  102be0:	00 
  102be1:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  102be8:	e8 01 e1 ff ff       	call   100cee <__panic>
        p->flags = p->property = 0;
  102bed:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102bf0:	c7 40 08 00 00 00 00 	movl   $0x0,0x8(%eax)
  102bf7:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102bfa:	8b 50 08             	mov    0x8(%eax),%edx
  102bfd:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102c00:	89 50 04             	mov    %edx,0x4(%eax)
        set_page_ref(p, 0);
  102c03:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
  102c0a:	00 
  102c0b:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102c0e:	89 04 24             	mov    %eax,(%esp)
  102c11:	e8 10 ff ff ff       	call   102b26 <set_page_ref>
    for (; p != base + n; p ++) {
  102c16:	83 45 f4 14          	addl   $0x14,-0xc(%ebp)
  102c1a:	8b 55 0c             	mov    0xc(%ebp),%edx
  102c1d:	89 d0                	mov    %edx,%eax
  102c1f:	c1 e0 02             	shl    $0x2,%eax
  102c22:	01 d0                	add    %edx,%eax
  102c24:	c1 e0 02             	shl    $0x2,%eax
  102c27:	89 c2                	mov    %eax,%edx
  102c29:	8b 45 08             	mov    0x8(%ebp),%eax
  102c2c:	01 d0                	add    %edx,%eax
  102c2e:	39 45 f4             	cmp    %eax,-0xc(%ebp)
  102c31:	0f 85 66 ff ff ff    	jne    102b9d <default_init_memmap+0x38>
    }
    base->property = n;
  102c37:	8b 45 08             	mov    0x8(%ebp),%eax
  102c3a:	8b 55 0c             	mov    0xc(%ebp),%edx
  102c3d:	89 50 08             	mov    %edx,0x8(%eax)
    SetPageProperty(base);
  102c40:	8b 45 08             	mov    0x8(%ebp),%eax
  102c43:	83 c0 04             	add    $0x4,%eax
  102c46:	c7 45 c8 01 00 00 00 	movl   $0x1,-0x38(%ebp)
  102c4d:	89 45 c4             	mov    %eax,-0x3c(%ebp)
    asm volatile ("btsl %1, %0" :"=m" (*(volatile long *)addr) : "Ir" (nr));
  102c50:	8b 45 c4             	mov    -0x3c(%ebp),%eax
  102c53:	8b 55 c8             	mov    -0x38(%ebp),%edx
  102c56:	0f ab 10             	bts    %edx,(%eax)
}
  102c59:	90                   	nop
    nr_free += n;
  102c5a:	8b 15 b0 ce 11 00    	mov    0x11ceb0,%edx
  102c60:	8b 45 0c             	mov    0xc(%ebp),%eax
  102c63:	01 d0                	add    %edx,%eax
  102c65:	a3 b0 ce 11 00       	mov    %eax,0x11ceb0
    list_add(&free_list, &(base->page_link));
  102c6a:	8b 45 08             	mov    0x8(%ebp),%eax
  102c6d:	83 c0 0c             	add    $0xc,%eax
  102c70:	c7 45 e4 a8 ce 11 00 	movl   $0x11cea8,-0x1c(%ebp)
  102c77:	89 45 e0             	mov    %eax,-0x20(%ebp)
  102c7a:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  102c7d:	89 45 dc             	mov    %eax,-0x24(%ebp)
  102c80:	8b 45 e0             	mov    -0x20(%ebp),%eax
  102c83:	89 45 d8             	mov    %eax,-0x28(%ebp)
 * Insert the new element @elm *after* the element @listelm which
 * is already in the list.
 * */
static inline void
list_add_after(list_entry_t *listelm, list_entry_t *elm) {
    __list_add(elm, listelm, listelm->next);
  102c86:	8b 45 dc             	mov    -0x24(%ebp),%eax
  102c89:	8b 40 04             	mov    0x4(%eax),%eax
  102c8c:	8b 55 d8             	mov    -0x28(%ebp),%edx
  102c8f:	89 55 d4             	mov    %edx,-0x2c(%ebp)
  102c92:	8b 55 dc             	mov    -0x24(%ebp),%edx
  102c95:	89 55 d0             	mov    %edx,-0x30(%ebp)
  102c98:	89 45 cc             	mov    %eax,-0x34(%ebp)
 * This is only for internal list manipulation where we know
 * the prev/next entries already!
 * */
static inline void
__list_add(list_entry_t *elm, list_entry_t *prev, list_entry_t *next) {
    prev->next = next->prev = elm;
  102c9b:	8b 45 cc             	mov    -0x34(%ebp),%eax
  102c9e:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  102ca1:	89 10                	mov    %edx,(%eax)
  102ca3:	8b 45 cc             	mov    -0x34(%ebp),%eax
  102ca6:	8b 10                	mov    (%eax),%edx
  102ca8:	8b 45 d0             	mov    -0x30(%ebp),%eax
  102cab:	89 50 04             	mov    %edx,0x4(%eax)
    elm->next = next;
  102cae:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  102cb1:	8b 55 cc             	mov    -0x34(%ebp),%edx
  102cb4:	89 50 04             	mov    %edx,0x4(%eax)
    elm->prev = prev;
  102cb7:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  102cba:	8b 55 d0             	mov    -0x30(%ebp),%edx
  102cbd:	89 10                	mov    %edx,(%eax)
}
  102cbf:	90                   	nop
}
  102cc0:	90                   	nop
}
  102cc1:	90                   	nop
}
  102cc2:	90                   	nop
  102cc3:	89 ec                	mov    %ebp,%esp
  102cc5:	5d                   	pop    %ebp
  102cc6:	c3                   	ret    

00102cc7 <default_alloc_pages>:

static struct Page *
default_alloc_pages(size_t n) {
  102cc7:	55                   	push   %ebp
  102cc8:	89 e5                	mov    %esp,%ebp
  102cca:	83 ec 68             	sub    $0x68,%esp
    assert(n > 0);
  102ccd:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  102cd1:	75 24                	jne    102cf7 <default_alloc_pages+0x30>
  102cd3:	c7 44 24 0c 50 67 10 	movl   $0x106750,0xc(%esp)
  102cda:	00 
  102cdb:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  102ce2:	00 
  102ce3:	c7 44 24 04 7c 00 00 	movl   $0x7c,0x4(%esp)
  102cea:	00 
  102ceb:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  102cf2:	e8 f7 df ff ff       	call   100cee <__panic>
    if (n > nr_free) {
  102cf7:	a1 b0 ce 11 00       	mov    0x11ceb0,%eax
  102cfc:	39 45 08             	cmp    %eax,0x8(%ebp)
  102cff:	76 0a                	jbe    102d0b <default_alloc_pages+0x44>
        return NULL;
  102d01:	b8 00 00 00 00       	mov    $0x0,%eax
  102d06:	e9 34 01 00 00       	jmp    102e3f <default_alloc_pages+0x178>
    }
    struct Page *page = NULL;
  102d0b:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    list_entry_t *le = &free_list;
  102d12:	c7 45 f0 a8 ce 11 00 	movl   $0x11cea8,-0x10(%ebp)
    while ((le = list_next(le)) != &free_list) {
  102d19:	eb 1c                	jmp    102d37 <default_alloc_pages+0x70>
        struct Page *p = le2page(le, page_link);
  102d1b:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102d1e:	83 e8 0c             	sub    $0xc,%eax
  102d21:	89 45 ec             	mov    %eax,-0x14(%ebp)
        if (p->property >= n) {
  102d24:	8b 45 ec             	mov    -0x14(%ebp),%eax
  102d27:	8b 40 08             	mov    0x8(%eax),%eax
  102d2a:	39 45 08             	cmp    %eax,0x8(%ebp)
  102d2d:	77 08                	ja     102d37 <default_alloc_pages+0x70>
            page = p;
  102d2f:	8b 45 ec             	mov    -0x14(%ebp),%eax
  102d32:	89 45 f4             	mov    %eax,-0xc(%ebp)
            break;
  102d35:	eb 18                	jmp    102d4f <default_alloc_pages+0x88>
  102d37:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102d3a:	89 45 e4             	mov    %eax,-0x1c(%ebp)
    return listelm->next;
  102d3d:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  102d40:	8b 40 04             	mov    0x4(%eax),%eax
    while ((le = list_next(le)) != &free_list) {
  102d43:	89 45 f0             	mov    %eax,-0x10(%ebp)
  102d46:	81 7d f0 a8 ce 11 00 	cmpl   $0x11cea8,-0x10(%ebp)
  102d4d:	75 cc                	jne    102d1b <default_alloc_pages+0x54>
        }
    }
    if (page != NULL) {
  102d4f:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  102d53:	0f 84 e3 00 00 00    	je     102e3c <default_alloc_pages+0x175>
        list_del(&(page->page_link));
  102d59:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102d5c:	83 c0 0c             	add    $0xc,%eax
  102d5f:	89 45 e0             	mov    %eax,-0x20(%ebp)
    __list_del(listelm->prev, listelm->next);
  102d62:	8b 45 e0             	mov    -0x20(%ebp),%eax
  102d65:	8b 40 04             	mov    0x4(%eax),%eax
  102d68:	8b 55 e0             	mov    -0x20(%ebp),%edx
  102d6b:	8b 12                	mov    (%edx),%edx
  102d6d:	89 55 dc             	mov    %edx,-0x24(%ebp)
  102d70:	89 45 d8             	mov    %eax,-0x28(%ebp)
 * This is only for internal list manipulation where we know
 * the prev/next entries already!
 * */
static inline void
__list_del(list_entry_t *prev, list_entry_t *next) {
    prev->next = next;
  102d73:	8b 45 dc             	mov    -0x24(%ebp),%eax
  102d76:	8b 55 d8             	mov    -0x28(%ebp),%edx
  102d79:	89 50 04             	mov    %edx,0x4(%eax)
    next->prev = prev;
  102d7c:	8b 45 d8             	mov    -0x28(%ebp),%eax
  102d7f:	8b 55 dc             	mov    -0x24(%ebp),%edx
  102d82:	89 10                	mov    %edx,(%eax)
}
  102d84:	90                   	nop
}
  102d85:	90                   	nop
        if (page->property > n) {
  102d86:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102d89:	8b 40 08             	mov    0x8(%eax),%eax
  102d8c:	39 45 08             	cmp    %eax,0x8(%ebp)
  102d8f:	0f 83 80 00 00 00    	jae    102e15 <default_alloc_pages+0x14e>
            struct Page *p = page + n;
  102d95:	8b 55 08             	mov    0x8(%ebp),%edx
  102d98:	89 d0                	mov    %edx,%eax
  102d9a:	c1 e0 02             	shl    $0x2,%eax
  102d9d:	01 d0                	add    %edx,%eax
  102d9f:	c1 e0 02             	shl    $0x2,%eax
  102da2:	89 c2                	mov    %eax,%edx
  102da4:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102da7:	01 d0                	add    %edx,%eax
  102da9:	89 45 e8             	mov    %eax,-0x18(%ebp)
            p->property = page->property - n;
  102dac:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102daf:	8b 40 08             	mov    0x8(%eax),%eax
  102db2:	2b 45 08             	sub    0x8(%ebp),%eax
  102db5:	89 c2                	mov    %eax,%edx
  102db7:	8b 45 e8             	mov    -0x18(%ebp),%eax
  102dba:	89 50 08             	mov    %edx,0x8(%eax)
            list_add(&free_list, &(p->page_link));
  102dbd:	8b 45 e8             	mov    -0x18(%ebp),%eax
  102dc0:	83 c0 0c             	add    $0xc,%eax
  102dc3:	c7 45 d4 a8 ce 11 00 	movl   $0x11cea8,-0x2c(%ebp)
  102dca:	89 45 d0             	mov    %eax,-0x30(%ebp)
  102dcd:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  102dd0:	89 45 cc             	mov    %eax,-0x34(%ebp)
  102dd3:	8b 45 d0             	mov    -0x30(%ebp),%eax
  102dd6:	89 45 c8             	mov    %eax,-0x38(%ebp)
    __list_add(elm, listelm, listelm->next);
  102dd9:	8b 45 cc             	mov    -0x34(%ebp),%eax
  102ddc:	8b 40 04             	mov    0x4(%eax),%eax
  102ddf:	8b 55 c8             	mov    -0x38(%ebp),%edx
  102de2:	89 55 c4             	mov    %edx,-0x3c(%ebp)
  102de5:	8b 55 cc             	mov    -0x34(%ebp),%edx
  102de8:	89 55 c0             	mov    %edx,-0x40(%ebp)
  102deb:	89 45 bc             	mov    %eax,-0x44(%ebp)
    prev->next = next->prev = elm;
  102dee:	8b 45 bc             	mov    -0x44(%ebp),%eax
  102df1:	8b 55 c4             	mov    -0x3c(%ebp),%edx
  102df4:	89 10                	mov    %edx,(%eax)
  102df6:	8b 45 bc             	mov    -0x44(%ebp),%eax
  102df9:	8b 10                	mov    (%eax),%edx
  102dfb:	8b 45 c0             	mov    -0x40(%ebp),%eax
  102dfe:	89 50 04             	mov    %edx,0x4(%eax)
    elm->next = next;
  102e01:	8b 45 c4             	mov    -0x3c(%ebp),%eax
  102e04:	8b 55 bc             	mov    -0x44(%ebp),%edx
  102e07:	89 50 04             	mov    %edx,0x4(%eax)
    elm->prev = prev;
  102e0a:	8b 45 c4             	mov    -0x3c(%ebp),%eax
  102e0d:	8b 55 c0             	mov    -0x40(%ebp),%edx
  102e10:	89 10                	mov    %edx,(%eax)
}
  102e12:	90                   	nop
}
  102e13:	90                   	nop
}
  102e14:	90                   	nop
    }
        nr_free -= n;
  102e15:	a1 b0 ce 11 00       	mov    0x11ceb0,%eax
  102e1a:	2b 45 08             	sub    0x8(%ebp),%eax
  102e1d:	a3 b0 ce 11 00       	mov    %eax,0x11ceb0
        ClearPageProperty(page);
  102e22:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102e25:	83 c0 04             	add    $0x4,%eax
  102e28:	c7 45 b8 01 00 00 00 	movl   $0x1,-0x48(%ebp)
  102e2f:	89 45 b4             	mov    %eax,-0x4c(%ebp)
    asm volatile ("btrl %1, %0" :"=m" (*(volatile long *)addr) : "Ir" (nr));
  102e32:	8b 45 b4             	mov    -0x4c(%ebp),%eax
  102e35:	8b 55 b8             	mov    -0x48(%ebp),%edx
  102e38:	0f b3 10             	btr    %edx,(%eax)
}
  102e3b:	90                   	nop
    }
    return page;
  102e3c:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  102e3f:	89 ec                	mov    %ebp,%esp
  102e41:	5d                   	pop    %ebp
  102e42:	c3                   	ret    

00102e43 <default_free_pages>:

static void
default_free_pages(struct Page *base, size_t n) {
  102e43:	55                   	push   %ebp
  102e44:	89 e5                	mov    %esp,%ebp
  102e46:	81 ec 98 00 00 00    	sub    $0x98,%esp
    assert(n > 0);
  102e4c:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
  102e50:	75 24                	jne    102e76 <default_free_pages+0x33>
  102e52:	c7 44 24 0c 50 67 10 	movl   $0x106750,0xc(%esp)
  102e59:	00 
  102e5a:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  102e61:	00 
  102e62:	c7 44 24 04 98 00 00 	movl   $0x98,0x4(%esp)
  102e69:	00 
  102e6a:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  102e71:	e8 78 de ff ff       	call   100cee <__panic>
    struct Page *p = base;
  102e76:	8b 45 08             	mov    0x8(%ebp),%eax
  102e79:	89 45 f4             	mov    %eax,-0xc(%ebp)
    for (; p != base + n; p ++) {
  102e7c:	e9 9d 00 00 00       	jmp    102f1e <default_free_pages+0xdb>
        assert(!PageReserved(p) && !PageProperty(p));
  102e81:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102e84:	83 c0 04             	add    $0x4,%eax
  102e87:	c7 45 ec 00 00 00 00 	movl   $0x0,-0x14(%ebp)
  102e8e:	89 45 e8             	mov    %eax,-0x18(%ebp)
    asm volatile ("btl %2, %1; sbbl %0,%0" : "=r" (oldbit) : "m" (*(volatile long *)addr), "Ir" (nr));
  102e91:	8b 45 e8             	mov    -0x18(%ebp),%eax
  102e94:	8b 55 ec             	mov    -0x14(%ebp),%edx
  102e97:	0f a3 10             	bt     %edx,(%eax)
  102e9a:	19 c0                	sbb    %eax,%eax
  102e9c:	89 45 e4             	mov    %eax,-0x1c(%ebp)
    return oldbit != 0;
  102e9f:	83 7d e4 00          	cmpl   $0x0,-0x1c(%ebp)
  102ea3:	0f 95 c0             	setne  %al
  102ea6:	0f b6 c0             	movzbl %al,%eax
  102ea9:	85 c0                	test   %eax,%eax
  102eab:	75 2c                	jne    102ed9 <default_free_pages+0x96>
  102ead:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102eb0:	83 c0 04             	add    $0x4,%eax
  102eb3:	c7 45 e0 01 00 00 00 	movl   $0x1,-0x20(%ebp)
  102eba:	89 45 dc             	mov    %eax,-0x24(%ebp)
    asm volatile ("btl %2, %1; sbbl %0,%0" : "=r" (oldbit) : "m" (*(volatile long *)addr), "Ir" (nr));
  102ebd:	8b 45 dc             	mov    -0x24(%ebp),%eax
  102ec0:	8b 55 e0             	mov    -0x20(%ebp),%edx
  102ec3:	0f a3 10             	bt     %edx,(%eax)
  102ec6:	19 c0                	sbb    %eax,%eax
  102ec8:	89 45 d8             	mov    %eax,-0x28(%ebp)
    return oldbit != 0;
  102ecb:	83 7d d8 00          	cmpl   $0x0,-0x28(%ebp)
  102ecf:	0f 95 c0             	setne  %al
  102ed2:	0f b6 c0             	movzbl %al,%eax
  102ed5:	85 c0                	test   %eax,%eax
  102ed7:	74 24                	je     102efd <default_free_pages+0xba>
  102ed9:	c7 44 24 0c 94 67 10 	movl   $0x106794,0xc(%esp)
  102ee0:	00 
  102ee1:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  102ee8:	00 
  102ee9:	c7 44 24 04 9b 00 00 	movl   $0x9b,0x4(%esp)
  102ef0:	00 
  102ef1:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  102ef8:	e8 f1 dd ff ff       	call   100cee <__panic>
        p->flags = 0;
  102efd:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102f00:	c7 40 04 00 00 00 00 	movl   $0x0,0x4(%eax)
        set_page_ref(p, 0);
  102f07:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
  102f0e:	00 
  102f0f:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102f12:	89 04 24             	mov    %eax,(%esp)
  102f15:	e8 0c fc ff ff       	call   102b26 <set_page_ref>
    for (; p != base + n; p ++) {
  102f1a:	83 45 f4 14          	addl   $0x14,-0xc(%ebp)
  102f1e:	8b 55 0c             	mov    0xc(%ebp),%edx
  102f21:	89 d0                	mov    %edx,%eax
  102f23:	c1 e0 02             	shl    $0x2,%eax
  102f26:	01 d0                	add    %edx,%eax
  102f28:	c1 e0 02             	shl    $0x2,%eax
  102f2b:	89 c2                	mov    %eax,%edx
  102f2d:	8b 45 08             	mov    0x8(%ebp),%eax
  102f30:	01 d0                	add    %edx,%eax
  102f32:	39 45 f4             	cmp    %eax,-0xc(%ebp)
  102f35:	0f 85 46 ff ff ff    	jne    102e81 <default_free_pages+0x3e>
    }
    base->property = n;
  102f3b:	8b 45 08             	mov    0x8(%ebp),%eax
  102f3e:	8b 55 0c             	mov    0xc(%ebp),%edx
  102f41:	89 50 08             	mov    %edx,0x8(%eax)
    SetPageProperty(base);
  102f44:	8b 45 08             	mov    0x8(%ebp),%eax
  102f47:	83 c0 04             	add    $0x4,%eax
  102f4a:	c7 45 d0 01 00 00 00 	movl   $0x1,-0x30(%ebp)
  102f51:	89 45 cc             	mov    %eax,-0x34(%ebp)
    asm volatile ("btsl %1, %0" :"=m" (*(volatile long *)addr) : "Ir" (nr));
  102f54:	8b 45 cc             	mov    -0x34(%ebp),%eax
  102f57:	8b 55 d0             	mov    -0x30(%ebp),%edx
  102f5a:	0f ab 10             	bts    %edx,(%eax)
}
  102f5d:	90                   	nop
  102f5e:	c7 45 d4 a8 ce 11 00 	movl   $0x11cea8,-0x2c(%ebp)
    return listelm->next;
  102f65:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  102f68:	8b 40 04             	mov    0x4(%eax),%eax
    list_entry_t *le = list_next(&free_list);
  102f6b:	89 45 f0             	mov    %eax,-0x10(%ebp)
    while (le != &free_list) {
  102f6e:	e9 0e 01 00 00       	jmp    103081 <default_free_pages+0x23e>
        p = le2page(le, page_link);
  102f73:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102f76:	83 e8 0c             	sub    $0xc,%eax
  102f79:	89 45 f4             	mov    %eax,-0xc(%ebp)
  102f7c:	8b 45 f0             	mov    -0x10(%ebp),%eax
  102f7f:	89 45 c8             	mov    %eax,-0x38(%ebp)
  102f82:	8b 45 c8             	mov    -0x38(%ebp),%eax
  102f85:	8b 40 04             	mov    0x4(%eax),%eax
        le = list_next(le);
  102f88:	89 45 f0             	mov    %eax,-0x10(%ebp)
        if (base + base->property == p) {
  102f8b:	8b 45 08             	mov    0x8(%ebp),%eax
  102f8e:	8b 50 08             	mov    0x8(%eax),%edx
  102f91:	89 d0                	mov    %edx,%eax
  102f93:	c1 e0 02             	shl    $0x2,%eax
  102f96:	01 d0                	add    %edx,%eax
  102f98:	c1 e0 02             	shl    $0x2,%eax
  102f9b:	89 c2                	mov    %eax,%edx
  102f9d:	8b 45 08             	mov    0x8(%ebp),%eax
  102fa0:	01 d0                	add    %edx,%eax
  102fa2:	39 45 f4             	cmp    %eax,-0xc(%ebp)
  102fa5:	75 5d                	jne    103004 <default_free_pages+0x1c1>
            base->property += p->property;
  102fa7:	8b 45 08             	mov    0x8(%ebp),%eax
  102faa:	8b 50 08             	mov    0x8(%eax),%edx
  102fad:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102fb0:	8b 40 08             	mov    0x8(%eax),%eax
  102fb3:	01 c2                	add    %eax,%edx
  102fb5:	8b 45 08             	mov    0x8(%ebp),%eax
  102fb8:	89 50 08             	mov    %edx,0x8(%eax)
            ClearPageProperty(p);
  102fbb:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102fbe:	83 c0 04             	add    $0x4,%eax
  102fc1:	c7 45 b8 01 00 00 00 	movl   $0x1,-0x48(%ebp)
  102fc8:	89 45 b4             	mov    %eax,-0x4c(%ebp)
    asm volatile ("btrl %1, %0" :"=m" (*(volatile long *)addr) : "Ir" (nr));
  102fcb:	8b 45 b4             	mov    -0x4c(%ebp),%eax
  102fce:	8b 55 b8             	mov    -0x48(%ebp),%edx
  102fd1:	0f b3 10             	btr    %edx,(%eax)
}
  102fd4:	90                   	nop
            list_del(&(p->page_link));
  102fd5:	8b 45 f4             	mov    -0xc(%ebp),%eax
  102fd8:	83 c0 0c             	add    $0xc,%eax
  102fdb:	89 45 c4             	mov    %eax,-0x3c(%ebp)
    __list_del(listelm->prev, listelm->next);
  102fde:	8b 45 c4             	mov    -0x3c(%ebp),%eax
  102fe1:	8b 40 04             	mov    0x4(%eax),%eax
  102fe4:	8b 55 c4             	mov    -0x3c(%ebp),%edx
  102fe7:	8b 12                	mov    (%edx),%edx
  102fe9:	89 55 c0             	mov    %edx,-0x40(%ebp)
  102fec:	89 45 bc             	mov    %eax,-0x44(%ebp)
    prev->next = next;
  102fef:	8b 45 c0             	mov    -0x40(%ebp),%eax
  102ff2:	8b 55 bc             	mov    -0x44(%ebp),%edx
  102ff5:	89 50 04             	mov    %edx,0x4(%eax)
    next->prev = prev;
  102ff8:	8b 45 bc             	mov    -0x44(%ebp),%eax
  102ffb:	8b 55 c0             	mov    -0x40(%ebp),%edx
  102ffe:	89 10                	mov    %edx,(%eax)
}
  103000:	90                   	nop
}
  103001:	90                   	nop
  103002:	eb 7d                	jmp    103081 <default_free_pages+0x23e>
        }
        else if (p + p->property == base) {
  103004:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103007:	8b 50 08             	mov    0x8(%eax),%edx
  10300a:	89 d0                	mov    %edx,%eax
  10300c:	c1 e0 02             	shl    $0x2,%eax
  10300f:	01 d0                	add    %edx,%eax
  103011:	c1 e0 02             	shl    $0x2,%eax
  103014:	89 c2                	mov    %eax,%edx
  103016:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103019:	01 d0                	add    %edx,%eax
  10301b:	39 45 08             	cmp    %eax,0x8(%ebp)
  10301e:	75 61                	jne    103081 <default_free_pages+0x23e>
            p->property += base->property;
  103020:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103023:	8b 50 08             	mov    0x8(%eax),%edx
  103026:	8b 45 08             	mov    0x8(%ebp),%eax
  103029:	8b 40 08             	mov    0x8(%eax),%eax
  10302c:	01 c2                	add    %eax,%edx
  10302e:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103031:	89 50 08             	mov    %edx,0x8(%eax)
            ClearPageProperty(base);
  103034:	8b 45 08             	mov    0x8(%ebp),%eax
  103037:	83 c0 04             	add    $0x4,%eax
  10303a:	c7 45 a4 01 00 00 00 	movl   $0x1,-0x5c(%ebp)
  103041:	89 45 a0             	mov    %eax,-0x60(%ebp)
    asm volatile ("btrl %1, %0" :"=m" (*(volatile long *)addr) : "Ir" (nr));
  103044:	8b 45 a0             	mov    -0x60(%ebp),%eax
  103047:	8b 55 a4             	mov    -0x5c(%ebp),%edx
  10304a:	0f b3 10             	btr    %edx,(%eax)
}
  10304d:	90                   	nop
            base = p;
  10304e:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103051:	89 45 08             	mov    %eax,0x8(%ebp)
            list_del(&(p->page_link));
  103054:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103057:	83 c0 0c             	add    $0xc,%eax
  10305a:	89 45 b0             	mov    %eax,-0x50(%ebp)
    __list_del(listelm->prev, listelm->next);
  10305d:	8b 45 b0             	mov    -0x50(%ebp),%eax
  103060:	8b 40 04             	mov    0x4(%eax),%eax
  103063:	8b 55 b0             	mov    -0x50(%ebp),%edx
  103066:	8b 12                	mov    (%edx),%edx
  103068:	89 55 ac             	mov    %edx,-0x54(%ebp)
  10306b:	89 45 a8             	mov    %eax,-0x58(%ebp)
    prev->next = next;
  10306e:	8b 45 ac             	mov    -0x54(%ebp),%eax
  103071:	8b 55 a8             	mov    -0x58(%ebp),%edx
  103074:	89 50 04             	mov    %edx,0x4(%eax)
    next->prev = prev;
  103077:	8b 45 a8             	mov    -0x58(%ebp),%eax
  10307a:	8b 55 ac             	mov    -0x54(%ebp),%edx
  10307d:	89 10                	mov    %edx,(%eax)
}
  10307f:	90                   	nop
}
  103080:	90                   	nop
    while (le != &free_list) {
  103081:	81 7d f0 a8 ce 11 00 	cmpl   $0x11cea8,-0x10(%ebp)
  103088:	0f 85 e5 fe ff ff    	jne    102f73 <default_free_pages+0x130>
        }
    }
    nr_free += n;
  10308e:	8b 15 b0 ce 11 00    	mov    0x11ceb0,%edx
  103094:	8b 45 0c             	mov    0xc(%ebp),%eax
  103097:	01 d0                	add    %edx,%eax
  103099:	a3 b0 ce 11 00       	mov    %eax,0x11ceb0
    list_add(&free_list, &(base->page_link));
  10309e:	8b 45 08             	mov    0x8(%ebp),%eax
  1030a1:	83 c0 0c             	add    $0xc,%eax
  1030a4:	c7 45 9c a8 ce 11 00 	movl   $0x11cea8,-0x64(%ebp)
  1030ab:	89 45 98             	mov    %eax,-0x68(%ebp)
  1030ae:	8b 45 9c             	mov    -0x64(%ebp),%eax
  1030b1:	89 45 94             	mov    %eax,-0x6c(%ebp)
  1030b4:	8b 45 98             	mov    -0x68(%ebp),%eax
  1030b7:	89 45 90             	mov    %eax,-0x70(%ebp)
    __list_add(elm, listelm, listelm->next);
  1030ba:	8b 45 94             	mov    -0x6c(%ebp),%eax
  1030bd:	8b 40 04             	mov    0x4(%eax),%eax
  1030c0:	8b 55 90             	mov    -0x70(%ebp),%edx
  1030c3:	89 55 8c             	mov    %edx,-0x74(%ebp)
  1030c6:	8b 55 94             	mov    -0x6c(%ebp),%edx
  1030c9:	89 55 88             	mov    %edx,-0x78(%ebp)
  1030cc:	89 45 84             	mov    %eax,-0x7c(%ebp)
    prev->next = next->prev = elm;
  1030cf:	8b 45 84             	mov    -0x7c(%ebp),%eax
  1030d2:	8b 55 8c             	mov    -0x74(%ebp),%edx
  1030d5:	89 10                	mov    %edx,(%eax)
  1030d7:	8b 45 84             	mov    -0x7c(%ebp),%eax
  1030da:	8b 10                	mov    (%eax),%edx
  1030dc:	8b 45 88             	mov    -0x78(%ebp),%eax
  1030df:	89 50 04             	mov    %edx,0x4(%eax)
    elm->next = next;
  1030e2:	8b 45 8c             	mov    -0x74(%ebp),%eax
  1030e5:	8b 55 84             	mov    -0x7c(%ebp),%edx
  1030e8:	89 50 04             	mov    %edx,0x4(%eax)
    elm->prev = prev;
  1030eb:	8b 45 8c             	mov    -0x74(%ebp),%eax
  1030ee:	8b 55 88             	mov    -0x78(%ebp),%edx
  1030f1:	89 10                	mov    %edx,(%eax)
}
  1030f3:	90                   	nop
}
  1030f4:	90                   	nop
}
  1030f5:	90                   	nop
}
  1030f6:	90                   	nop
  1030f7:	89 ec                	mov    %ebp,%esp
  1030f9:	5d                   	pop    %ebp
  1030fa:	c3                   	ret    

001030fb <default_nr_free_pages>:

static size_t
default_nr_free_pages(void) {
  1030fb:	55                   	push   %ebp
  1030fc:	89 e5                	mov    %esp,%ebp
    return nr_free;
  1030fe:	a1 b0 ce 11 00       	mov    0x11ceb0,%eax
}
  103103:	5d                   	pop    %ebp
  103104:	c3                   	ret    

00103105 <basic_check>:

static void
basic_check(void) {
  103105:	55                   	push   %ebp
  103106:	89 e5                	mov    %esp,%ebp
  103108:	83 ec 48             	sub    $0x48,%esp
    struct Page *p0, *p1, *p2;
    p0 = p1 = p2 = NULL;
  10310b:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  103112:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103115:	89 45 f0             	mov    %eax,-0x10(%ebp)
  103118:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10311b:	89 45 ec             	mov    %eax,-0x14(%ebp)
    assert((p0 = alloc_page()) != NULL);
  10311e:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  103125:	e8 df 0e 00 00       	call   104009 <alloc_pages>
  10312a:	89 45 ec             	mov    %eax,-0x14(%ebp)
  10312d:	83 7d ec 00          	cmpl   $0x0,-0x14(%ebp)
  103131:	75 24                	jne    103157 <basic_check+0x52>
  103133:	c7 44 24 0c b9 67 10 	movl   $0x1067b9,0xc(%esp)
  10313a:	00 
  10313b:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103142:	00 
  103143:	c7 44 24 04 be 00 00 	movl   $0xbe,0x4(%esp)
  10314a:	00 
  10314b:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103152:	e8 97 db ff ff       	call   100cee <__panic>
    assert((p1 = alloc_page()) != NULL);
  103157:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  10315e:	e8 a6 0e 00 00       	call   104009 <alloc_pages>
  103163:	89 45 f0             	mov    %eax,-0x10(%ebp)
  103166:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  10316a:	75 24                	jne    103190 <basic_check+0x8b>
  10316c:	c7 44 24 0c d5 67 10 	movl   $0x1067d5,0xc(%esp)
  103173:	00 
  103174:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  10317b:	00 
  10317c:	c7 44 24 04 bf 00 00 	movl   $0xbf,0x4(%esp)
  103183:	00 
  103184:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  10318b:	e8 5e db ff ff       	call   100cee <__panic>
    assert((p2 = alloc_page()) != NULL);
  103190:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  103197:	e8 6d 0e 00 00       	call   104009 <alloc_pages>
  10319c:	89 45 f4             	mov    %eax,-0xc(%ebp)
  10319f:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  1031a3:	75 24                	jne    1031c9 <basic_check+0xc4>
  1031a5:	c7 44 24 0c f1 67 10 	movl   $0x1067f1,0xc(%esp)
  1031ac:	00 
  1031ad:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1031b4:	00 
  1031b5:	c7 44 24 04 c0 00 00 	movl   $0xc0,0x4(%esp)
  1031bc:	00 
  1031bd:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  1031c4:	e8 25 db ff ff       	call   100cee <__panic>

    assert(p0 != p1 && p0 != p2 && p1 != p2);
  1031c9:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1031cc:	3b 45 f0             	cmp    -0x10(%ebp),%eax
  1031cf:	74 10                	je     1031e1 <basic_check+0xdc>
  1031d1:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1031d4:	3b 45 f4             	cmp    -0xc(%ebp),%eax
  1031d7:	74 08                	je     1031e1 <basic_check+0xdc>
  1031d9:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1031dc:	3b 45 f4             	cmp    -0xc(%ebp),%eax
  1031df:	75 24                	jne    103205 <basic_check+0x100>
  1031e1:	c7 44 24 0c 10 68 10 	movl   $0x106810,0xc(%esp)
  1031e8:	00 
  1031e9:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1031f0:	00 
  1031f1:	c7 44 24 04 c2 00 00 	movl   $0xc2,0x4(%esp)
  1031f8:	00 
  1031f9:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103200:	e8 e9 da ff ff       	call   100cee <__panic>
    assert(page_ref(p0) == 0 && page_ref(p1) == 0 && page_ref(p2) == 0);
  103205:	8b 45 ec             	mov    -0x14(%ebp),%eax
  103208:	89 04 24             	mov    %eax,(%esp)
  10320b:	e8 0c f9 ff ff       	call   102b1c <page_ref>
  103210:	85 c0                	test   %eax,%eax
  103212:	75 1e                	jne    103232 <basic_check+0x12d>
  103214:	8b 45 f0             	mov    -0x10(%ebp),%eax
  103217:	89 04 24             	mov    %eax,(%esp)
  10321a:	e8 fd f8 ff ff       	call   102b1c <page_ref>
  10321f:	85 c0                	test   %eax,%eax
  103221:	75 0f                	jne    103232 <basic_check+0x12d>
  103223:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103226:	89 04 24             	mov    %eax,(%esp)
  103229:	e8 ee f8 ff ff       	call   102b1c <page_ref>
  10322e:	85 c0                	test   %eax,%eax
  103230:	74 24                	je     103256 <basic_check+0x151>
  103232:	c7 44 24 0c 34 68 10 	movl   $0x106834,0xc(%esp)
  103239:	00 
  10323a:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103241:	00 
  103242:	c7 44 24 04 c3 00 00 	movl   $0xc3,0x4(%esp)
  103249:	00 
  10324a:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103251:	e8 98 da ff ff       	call   100cee <__panic>

    assert(page2pa(p0) < npage * PGSIZE);
  103256:	8b 45 ec             	mov    -0x14(%ebp),%eax
  103259:	89 04 24             	mov    %eax,(%esp)
  10325c:	e8 a3 f8 ff ff       	call   102b04 <page2pa>
  103261:	8b 15 c4 ce 11 00    	mov    0x11cec4,%edx
  103267:	c1 e2 0c             	shl    $0xc,%edx
  10326a:	39 d0                	cmp    %edx,%eax
  10326c:	72 24                	jb     103292 <basic_check+0x18d>
  10326e:	c7 44 24 0c 70 68 10 	movl   $0x106870,0xc(%esp)
  103275:	00 
  103276:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  10327d:	00 
  10327e:	c7 44 24 04 c5 00 00 	movl   $0xc5,0x4(%esp)
  103285:	00 
  103286:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  10328d:	e8 5c da ff ff       	call   100cee <__panic>
    assert(page2pa(p1) < npage * PGSIZE);
  103292:	8b 45 f0             	mov    -0x10(%ebp),%eax
  103295:	89 04 24             	mov    %eax,(%esp)
  103298:	e8 67 f8 ff ff       	call   102b04 <page2pa>
  10329d:	8b 15 c4 ce 11 00    	mov    0x11cec4,%edx
  1032a3:	c1 e2 0c             	shl    $0xc,%edx
  1032a6:	39 d0                	cmp    %edx,%eax
  1032a8:	72 24                	jb     1032ce <basic_check+0x1c9>
  1032aa:	c7 44 24 0c 8d 68 10 	movl   $0x10688d,0xc(%esp)
  1032b1:	00 
  1032b2:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1032b9:	00 
  1032ba:	c7 44 24 04 c6 00 00 	movl   $0xc6,0x4(%esp)
  1032c1:	00 
  1032c2:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  1032c9:	e8 20 da ff ff       	call   100cee <__panic>
    assert(page2pa(p2) < npage * PGSIZE);
  1032ce:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1032d1:	89 04 24             	mov    %eax,(%esp)
  1032d4:	e8 2b f8 ff ff       	call   102b04 <page2pa>
  1032d9:	8b 15 c4 ce 11 00    	mov    0x11cec4,%edx
  1032df:	c1 e2 0c             	shl    $0xc,%edx
  1032e2:	39 d0                	cmp    %edx,%eax
  1032e4:	72 24                	jb     10330a <basic_check+0x205>
  1032e6:	c7 44 24 0c aa 68 10 	movl   $0x1068aa,0xc(%esp)
  1032ed:	00 
  1032ee:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1032f5:	00 
  1032f6:	c7 44 24 04 c7 00 00 	movl   $0xc7,0x4(%esp)
  1032fd:	00 
  1032fe:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103305:	e8 e4 d9 ff ff       	call   100cee <__panic>

    list_entry_t free_list_store = free_list;
  10330a:	a1 a8 ce 11 00       	mov    0x11cea8,%eax
  10330f:	8b 15 ac ce 11 00    	mov    0x11ceac,%edx
  103315:	89 45 d0             	mov    %eax,-0x30(%ebp)
  103318:	89 55 d4             	mov    %edx,-0x2c(%ebp)
  10331b:	c7 45 dc a8 ce 11 00 	movl   $0x11cea8,-0x24(%ebp)
    elm->prev = elm->next = elm;
  103322:	8b 45 dc             	mov    -0x24(%ebp),%eax
  103325:	8b 55 dc             	mov    -0x24(%ebp),%edx
  103328:	89 50 04             	mov    %edx,0x4(%eax)
  10332b:	8b 45 dc             	mov    -0x24(%ebp),%eax
  10332e:	8b 50 04             	mov    0x4(%eax),%edx
  103331:	8b 45 dc             	mov    -0x24(%ebp),%eax
  103334:	89 10                	mov    %edx,(%eax)
}
  103336:	90                   	nop
  103337:	c7 45 e0 a8 ce 11 00 	movl   $0x11cea8,-0x20(%ebp)
    return list->next == list;
  10333e:	8b 45 e0             	mov    -0x20(%ebp),%eax
  103341:	8b 40 04             	mov    0x4(%eax),%eax
  103344:	39 45 e0             	cmp    %eax,-0x20(%ebp)
  103347:	0f 94 c0             	sete   %al
  10334a:	0f b6 c0             	movzbl %al,%eax
    list_init(&free_list);
    assert(list_empty(&free_list));
  10334d:	85 c0                	test   %eax,%eax
  10334f:	75 24                	jne    103375 <basic_check+0x270>
  103351:	c7 44 24 0c c7 68 10 	movl   $0x1068c7,0xc(%esp)
  103358:	00 
  103359:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103360:	00 
  103361:	c7 44 24 04 cb 00 00 	movl   $0xcb,0x4(%esp)
  103368:	00 
  103369:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103370:	e8 79 d9 ff ff       	call   100cee <__panic>

    unsigned int nr_free_store = nr_free;
  103375:	a1 b0 ce 11 00       	mov    0x11ceb0,%eax
  10337a:	89 45 e8             	mov    %eax,-0x18(%ebp)
    nr_free = 0;
  10337d:	c7 05 b0 ce 11 00 00 	movl   $0x0,0x11ceb0
  103384:	00 00 00 

    assert(alloc_page() == NULL);
  103387:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  10338e:	e8 76 0c 00 00       	call   104009 <alloc_pages>
  103393:	85 c0                	test   %eax,%eax
  103395:	74 24                	je     1033bb <basic_check+0x2b6>
  103397:	c7 44 24 0c de 68 10 	movl   $0x1068de,0xc(%esp)
  10339e:	00 
  10339f:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1033a6:	00 
  1033a7:	c7 44 24 04 d0 00 00 	movl   $0xd0,0x4(%esp)
  1033ae:	00 
  1033af:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  1033b6:	e8 33 d9 ff ff       	call   100cee <__panic>

    free_page(p0);
  1033bb:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  1033c2:	00 
  1033c3:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1033c6:	89 04 24             	mov    %eax,(%esp)
  1033c9:	e8 75 0c 00 00       	call   104043 <free_pages>
    free_page(p1);
  1033ce:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  1033d5:	00 
  1033d6:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1033d9:	89 04 24             	mov    %eax,(%esp)
  1033dc:	e8 62 0c 00 00       	call   104043 <free_pages>
    free_page(p2);
  1033e1:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  1033e8:	00 
  1033e9:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1033ec:	89 04 24             	mov    %eax,(%esp)
  1033ef:	e8 4f 0c 00 00       	call   104043 <free_pages>
    assert(nr_free == 3);
  1033f4:	a1 b0 ce 11 00       	mov    0x11ceb0,%eax
  1033f9:	83 f8 03             	cmp    $0x3,%eax
  1033fc:	74 24                	je     103422 <basic_check+0x31d>
  1033fe:	c7 44 24 0c f3 68 10 	movl   $0x1068f3,0xc(%esp)
  103405:	00 
  103406:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  10340d:	00 
  10340e:	c7 44 24 04 d5 00 00 	movl   $0xd5,0x4(%esp)
  103415:	00 
  103416:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  10341d:	e8 cc d8 ff ff       	call   100cee <__panic>

    assert((p0 = alloc_page()) != NULL);
  103422:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  103429:	e8 db 0b 00 00       	call   104009 <alloc_pages>
  10342e:	89 45 ec             	mov    %eax,-0x14(%ebp)
  103431:	83 7d ec 00          	cmpl   $0x0,-0x14(%ebp)
  103435:	75 24                	jne    10345b <basic_check+0x356>
  103437:	c7 44 24 0c b9 67 10 	movl   $0x1067b9,0xc(%esp)
  10343e:	00 
  10343f:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103446:	00 
  103447:	c7 44 24 04 d7 00 00 	movl   $0xd7,0x4(%esp)
  10344e:	00 
  10344f:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103456:	e8 93 d8 ff ff       	call   100cee <__panic>
    assert((p1 = alloc_page()) != NULL);
  10345b:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  103462:	e8 a2 0b 00 00       	call   104009 <alloc_pages>
  103467:	89 45 f0             	mov    %eax,-0x10(%ebp)
  10346a:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  10346e:	75 24                	jne    103494 <basic_check+0x38f>
  103470:	c7 44 24 0c d5 67 10 	movl   $0x1067d5,0xc(%esp)
  103477:	00 
  103478:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  10347f:	00 
  103480:	c7 44 24 04 d8 00 00 	movl   $0xd8,0x4(%esp)
  103487:	00 
  103488:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  10348f:	e8 5a d8 ff ff       	call   100cee <__panic>
    assert((p2 = alloc_page()) != NULL);
  103494:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  10349b:	e8 69 0b 00 00       	call   104009 <alloc_pages>
  1034a0:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1034a3:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  1034a7:	75 24                	jne    1034cd <basic_check+0x3c8>
  1034a9:	c7 44 24 0c f1 67 10 	movl   $0x1067f1,0xc(%esp)
  1034b0:	00 
  1034b1:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1034b8:	00 
  1034b9:	c7 44 24 04 d9 00 00 	movl   $0xd9,0x4(%esp)
  1034c0:	00 
  1034c1:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  1034c8:	e8 21 d8 ff ff       	call   100cee <__panic>

    assert(alloc_page() == NULL);
  1034cd:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  1034d4:	e8 30 0b 00 00       	call   104009 <alloc_pages>
  1034d9:	85 c0                	test   %eax,%eax
  1034db:	74 24                	je     103501 <basic_check+0x3fc>
  1034dd:	c7 44 24 0c de 68 10 	movl   $0x1068de,0xc(%esp)
  1034e4:	00 
  1034e5:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1034ec:	00 
  1034ed:	c7 44 24 04 db 00 00 	movl   $0xdb,0x4(%esp)
  1034f4:	00 
  1034f5:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  1034fc:	e8 ed d7 ff ff       	call   100cee <__panic>

    free_page(p0);
  103501:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  103508:	00 
  103509:	8b 45 ec             	mov    -0x14(%ebp),%eax
  10350c:	89 04 24             	mov    %eax,(%esp)
  10350f:	e8 2f 0b 00 00       	call   104043 <free_pages>
  103514:	c7 45 d8 a8 ce 11 00 	movl   $0x11cea8,-0x28(%ebp)
  10351b:	8b 45 d8             	mov    -0x28(%ebp),%eax
  10351e:	8b 40 04             	mov    0x4(%eax),%eax
  103521:	39 45 d8             	cmp    %eax,-0x28(%ebp)
  103524:	0f 94 c0             	sete   %al
  103527:	0f b6 c0             	movzbl %al,%eax
    assert(!list_empty(&free_list));
  10352a:	85 c0                	test   %eax,%eax
  10352c:	74 24                	je     103552 <basic_check+0x44d>
  10352e:	c7 44 24 0c 00 69 10 	movl   $0x106900,0xc(%esp)
  103535:	00 
  103536:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  10353d:	00 
  10353e:	c7 44 24 04 de 00 00 	movl   $0xde,0x4(%esp)
  103545:	00 
  103546:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  10354d:	e8 9c d7 ff ff       	call   100cee <__panic>

    struct Page *p;
    assert((p = alloc_page()) == p0);
  103552:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  103559:	e8 ab 0a 00 00       	call   104009 <alloc_pages>
  10355e:	89 45 e4             	mov    %eax,-0x1c(%ebp)
  103561:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  103564:	3b 45 ec             	cmp    -0x14(%ebp),%eax
  103567:	74 24                	je     10358d <basic_check+0x488>
  103569:	c7 44 24 0c 18 69 10 	movl   $0x106918,0xc(%esp)
  103570:	00 
  103571:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103578:	00 
  103579:	c7 44 24 04 e1 00 00 	movl   $0xe1,0x4(%esp)
  103580:	00 
  103581:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103588:	e8 61 d7 ff ff       	call   100cee <__panic>
    assert(alloc_page() == NULL);
  10358d:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  103594:	e8 70 0a 00 00       	call   104009 <alloc_pages>
  103599:	85 c0                	test   %eax,%eax
  10359b:	74 24                	je     1035c1 <basic_check+0x4bc>
  10359d:	c7 44 24 0c de 68 10 	movl   $0x1068de,0xc(%esp)
  1035a4:	00 
  1035a5:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1035ac:	00 
  1035ad:	c7 44 24 04 e2 00 00 	movl   $0xe2,0x4(%esp)
  1035b4:	00 
  1035b5:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  1035bc:	e8 2d d7 ff ff       	call   100cee <__panic>

    assert(nr_free == 0);
  1035c1:	a1 b0 ce 11 00       	mov    0x11ceb0,%eax
  1035c6:	85 c0                	test   %eax,%eax
  1035c8:	74 24                	je     1035ee <basic_check+0x4e9>
  1035ca:	c7 44 24 0c 31 69 10 	movl   $0x106931,0xc(%esp)
  1035d1:	00 
  1035d2:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1035d9:	00 
  1035da:	c7 44 24 04 e4 00 00 	movl   $0xe4,0x4(%esp)
  1035e1:	00 
  1035e2:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  1035e9:	e8 00 d7 ff ff       	call   100cee <__panic>
    free_list = free_list_store;
  1035ee:	8b 45 d0             	mov    -0x30(%ebp),%eax
  1035f1:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  1035f4:	a3 a8 ce 11 00       	mov    %eax,0x11cea8
  1035f9:	89 15 ac ce 11 00    	mov    %edx,0x11ceac
    nr_free = nr_free_store;
  1035ff:	8b 45 e8             	mov    -0x18(%ebp),%eax
  103602:	a3 b0 ce 11 00       	mov    %eax,0x11ceb0

    free_page(p);
  103607:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  10360e:	00 
  10360f:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  103612:	89 04 24             	mov    %eax,(%esp)
  103615:	e8 29 0a 00 00       	call   104043 <free_pages>
    free_page(p1);
  10361a:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  103621:	00 
  103622:	8b 45 f0             	mov    -0x10(%ebp),%eax
  103625:	89 04 24             	mov    %eax,(%esp)
  103628:	e8 16 0a 00 00       	call   104043 <free_pages>
    free_page(p2);
  10362d:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  103634:	00 
  103635:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103638:	89 04 24             	mov    %eax,(%esp)
  10363b:	e8 03 0a 00 00       	call   104043 <free_pages>
}
  103640:	90                   	nop
  103641:	89 ec                	mov    %ebp,%esp
  103643:	5d                   	pop    %ebp
  103644:	c3                   	ret    

00103645 <default_check>:

// LAB2: below code is used to check the first fit allocation algorithm (your EXERCISE 1) 
// NOTICE: You SHOULD NOT CHANGE basic_check, default_check functions!
static void
default_check(void) {
  103645:	55                   	push   %ebp
  103646:	89 e5                	mov    %esp,%ebp
  103648:	81 ec 98 00 00 00    	sub    $0x98,%esp
    int count = 0, total = 0;
  10364e:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  103655:	c7 45 f0 00 00 00 00 	movl   $0x0,-0x10(%ebp)
    list_entry_t *le = &free_list;
  10365c:	c7 45 ec a8 ce 11 00 	movl   $0x11cea8,-0x14(%ebp)
    while ((le = list_next(le)) != &free_list) {
  103663:	eb 6a                	jmp    1036cf <default_check+0x8a>
        struct Page *p = le2page(le, page_link);
  103665:	8b 45 ec             	mov    -0x14(%ebp),%eax
  103668:	83 e8 0c             	sub    $0xc,%eax
  10366b:	89 45 d4             	mov    %eax,-0x2c(%ebp)
        assert(PageProperty(p));
  10366e:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  103671:	83 c0 04             	add    $0x4,%eax
  103674:	c7 45 d0 01 00 00 00 	movl   $0x1,-0x30(%ebp)
  10367b:	89 45 cc             	mov    %eax,-0x34(%ebp)
    asm volatile ("btl %2, %1; sbbl %0,%0" : "=r" (oldbit) : "m" (*(volatile long *)addr), "Ir" (nr));
  10367e:	8b 45 cc             	mov    -0x34(%ebp),%eax
  103681:	8b 55 d0             	mov    -0x30(%ebp),%edx
  103684:	0f a3 10             	bt     %edx,(%eax)
  103687:	19 c0                	sbb    %eax,%eax
  103689:	89 45 c8             	mov    %eax,-0x38(%ebp)
    return oldbit != 0;
  10368c:	83 7d c8 00          	cmpl   $0x0,-0x38(%ebp)
  103690:	0f 95 c0             	setne  %al
  103693:	0f b6 c0             	movzbl %al,%eax
  103696:	85 c0                	test   %eax,%eax
  103698:	75 24                	jne    1036be <default_check+0x79>
  10369a:	c7 44 24 0c 3e 69 10 	movl   $0x10693e,0xc(%esp)
  1036a1:	00 
  1036a2:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1036a9:	00 
  1036aa:	c7 44 24 04 f5 00 00 	movl   $0xf5,0x4(%esp)
  1036b1:	00 
  1036b2:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  1036b9:	e8 30 d6 ff ff       	call   100cee <__panic>
        count ++, total += p->property;
  1036be:	ff 45 f4             	incl   -0xc(%ebp)
  1036c1:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  1036c4:	8b 50 08             	mov    0x8(%eax),%edx
  1036c7:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1036ca:	01 d0                	add    %edx,%eax
  1036cc:	89 45 f0             	mov    %eax,-0x10(%ebp)
  1036cf:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1036d2:	89 45 c4             	mov    %eax,-0x3c(%ebp)
    return listelm->next;
  1036d5:	8b 45 c4             	mov    -0x3c(%ebp),%eax
  1036d8:	8b 40 04             	mov    0x4(%eax),%eax
    while ((le = list_next(le)) != &free_list) {
  1036db:	89 45 ec             	mov    %eax,-0x14(%ebp)
  1036de:	81 7d ec a8 ce 11 00 	cmpl   $0x11cea8,-0x14(%ebp)
  1036e5:	0f 85 7a ff ff ff    	jne    103665 <default_check+0x20>
    }
    assert(total == nr_free_pages());
  1036eb:	e8 88 09 00 00       	call   104078 <nr_free_pages>
  1036f0:	8b 55 f0             	mov    -0x10(%ebp),%edx
  1036f3:	39 d0                	cmp    %edx,%eax
  1036f5:	74 24                	je     10371b <default_check+0xd6>
  1036f7:	c7 44 24 0c 4e 69 10 	movl   $0x10694e,0xc(%esp)
  1036fe:	00 
  1036ff:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103706:	00 
  103707:	c7 44 24 04 f8 00 00 	movl   $0xf8,0x4(%esp)
  10370e:	00 
  10370f:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103716:	e8 d3 d5 ff ff       	call   100cee <__panic>

    basic_check();
  10371b:	e8 e5 f9 ff ff       	call   103105 <basic_check>

    struct Page *p0 = alloc_pages(5), *p1, *p2;
  103720:	c7 04 24 05 00 00 00 	movl   $0x5,(%esp)
  103727:	e8 dd 08 00 00       	call   104009 <alloc_pages>
  10372c:	89 45 e8             	mov    %eax,-0x18(%ebp)
    assert(p0 != NULL);
  10372f:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  103733:	75 24                	jne    103759 <default_check+0x114>
  103735:	c7 44 24 0c 67 69 10 	movl   $0x106967,0xc(%esp)
  10373c:	00 
  10373d:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103744:	00 
  103745:	c7 44 24 04 fd 00 00 	movl   $0xfd,0x4(%esp)
  10374c:	00 
  10374d:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103754:	e8 95 d5 ff ff       	call   100cee <__panic>
    assert(!PageProperty(p0));
  103759:	8b 45 e8             	mov    -0x18(%ebp),%eax
  10375c:	83 c0 04             	add    $0x4,%eax
  10375f:	c7 45 c0 01 00 00 00 	movl   $0x1,-0x40(%ebp)
  103766:	89 45 bc             	mov    %eax,-0x44(%ebp)
    asm volatile ("btl %2, %1; sbbl %0,%0" : "=r" (oldbit) : "m" (*(volatile long *)addr), "Ir" (nr));
  103769:	8b 45 bc             	mov    -0x44(%ebp),%eax
  10376c:	8b 55 c0             	mov    -0x40(%ebp),%edx
  10376f:	0f a3 10             	bt     %edx,(%eax)
  103772:	19 c0                	sbb    %eax,%eax
  103774:	89 45 b8             	mov    %eax,-0x48(%ebp)
    return oldbit != 0;
  103777:	83 7d b8 00          	cmpl   $0x0,-0x48(%ebp)
  10377b:	0f 95 c0             	setne  %al
  10377e:	0f b6 c0             	movzbl %al,%eax
  103781:	85 c0                	test   %eax,%eax
  103783:	74 24                	je     1037a9 <default_check+0x164>
  103785:	c7 44 24 0c 72 69 10 	movl   $0x106972,0xc(%esp)
  10378c:	00 
  10378d:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103794:	00 
  103795:	c7 44 24 04 fe 00 00 	movl   $0xfe,0x4(%esp)
  10379c:	00 
  10379d:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  1037a4:	e8 45 d5 ff ff       	call   100cee <__panic>

    list_entry_t free_list_store = free_list;
  1037a9:	a1 a8 ce 11 00       	mov    0x11cea8,%eax
  1037ae:	8b 15 ac ce 11 00    	mov    0x11ceac,%edx
  1037b4:	89 45 80             	mov    %eax,-0x80(%ebp)
  1037b7:	89 55 84             	mov    %edx,-0x7c(%ebp)
  1037ba:	c7 45 b0 a8 ce 11 00 	movl   $0x11cea8,-0x50(%ebp)
    elm->prev = elm->next = elm;
  1037c1:	8b 45 b0             	mov    -0x50(%ebp),%eax
  1037c4:	8b 55 b0             	mov    -0x50(%ebp),%edx
  1037c7:	89 50 04             	mov    %edx,0x4(%eax)
  1037ca:	8b 45 b0             	mov    -0x50(%ebp),%eax
  1037cd:	8b 50 04             	mov    0x4(%eax),%edx
  1037d0:	8b 45 b0             	mov    -0x50(%ebp),%eax
  1037d3:	89 10                	mov    %edx,(%eax)
}
  1037d5:	90                   	nop
  1037d6:	c7 45 b4 a8 ce 11 00 	movl   $0x11cea8,-0x4c(%ebp)
    return list->next == list;
  1037dd:	8b 45 b4             	mov    -0x4c(%ebp),%eax
  1037e0:	8b 40 04             	mov    0x4(%eax),%eax
  1037e3:	39 45 b4             	cmp    %eax,-0x4c(%ebp)
  1037e6:	0f 94 c0             	sete   %al
  1037e9:	0f b6 c0             	movzbl %al,%eax
    list_init(&free_list);
    assert(list_empty(&free_list));
  1037ec:	85 c0                	test   %eax,%eax
  1037ee:	75 24                	jne    103814 <default_check+0x1cf>
  1037f0:	c7 44 24 0c c7 68 10 	movl   $0x1068c7,0xc(%esp)
  1037f7:	00 
  1037f8:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1037ff:	00 
  103800:	c7 44 24 04 02 01 00 	movl   $0x102,0x4(%esp)
  103807:	00 
  103808:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  10380f:	e8 da d4 ff ff       	call   100cee <__panic>
    assert(alloc_page() == NULL);
  103814:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  10381b:	e8 e9 07 00 00       	call   104009 <alloc_pages>
  103820:	85 c0                	test   %eax,%eax
  103822:	74 24                	je     103848 <default_check+0x203>
  103824:	c7 44 24 0c de 68 10 	movl   $0x1068de,0xc(%esp)
  10382b:	00 
  10382c:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103833:	00 
  103834:	c7 44 24 04 03 01 00 	movl   $0x103,0x4(%esp)
  10383b:	00 
  10383c:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103843:	e8 a6 d4 ff ff       	call   100cee <__panic>

    unsigned int nr_free_store = nr_free;
  103848:	a1 b0 ce 11 00       	mov    0x11ceb0,%eax
  10384d:	89 45 e4             	mov    %eax,-0x1c(%ebp)
    nr_free = 0;
  103850:	c7 05 b0 ce 11 00 00 	movl   $0x0,0x11ceb0
  103857:	00 00 00 

    free_pages(p0 + 2, 3);
  10385a:	8b 45 e8             	mov    -0x18(%ebp),%eax
  10385d:	83 c0 28             	add    $0x28,%eax
  103860:	c7 44 24 04 03 00 00 	movl   $0x3,0x4(%esp)
  103867:	00 
  103868:	89 04 24             	mov    %eax,(%esp)
  10386b:	e8 d3 07 00 00       	call   104043 <free_pages>
    assert(alloc_pages(4) == NULL);
  103870:	c7 04 24 04 00 00 00 	movl   $0x4,(%esp)
  103877:	e8 8d 07 00 00       	call   104009 <alloc_pages>
  10387c:	85 c0                	test   %eax,%eax
  10387e:	74 24                	je     1038a4 <default_check+0x25f>
  103880:	c7 44 24 0c 84 69 10 	movl   $0x106984,0xc(%esp)
  103887:	00 
  103888:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  10388f:	00 
  103890:	c7 44 24 04 09 01 00 	movl   $0x109,0x4(%esp)
  103897:	00 
  103898:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  10389f:	e8 4a d4 ff ff       	call   100cee <__panic>
    assert(PageProperty(p0 + 2) && p0[2].property == 3);
  1038a4:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1038a7:	83 c0 28             	add    $0x28,%eax
  1038aa:	83 c0 04             	add    $0x4,%eax
  1038ad:	c7 45 ac 01 00 00 00 	movl   $0x1,-0x54(%ebp)
  1038b4:	89 45 a8             	mov    %eax,-0x58(%ebp)
    asm volatile ("btl %2, %1; sbbl %0,%0" : "=r" (oldbit) : "m" (*(volatile long *)addr), "Ir" (nr));
  1038b7:	8b 45 a8             	mov    -0x58(%ebp),%eax
  1038ba:	8b 55 ac             	mov    -0x54(%ebp),%edx
  1038bd:	0f a3 10             	bt     %edx,(%eax)
  1038c0:	19 c0                	sbb    %eax,%eax
  1038c2:	89 45 a4             	mov    %eax,-0x5c(%ebp)
    return oldbit != 0;
  1038c5:	83 7d a4 00          	cmpl   $0x0,-0x5c(%ebp)
  1038c9:	0f 95 c0             	setne  %al
  1038cc:	0f b6 c0             	movzbl %al,%eax
  1038cf:	85 c0                	test   %eax,%eax
  1038d1:	74 0e                	je     1038e1 <default_check+0x29c>
  1038d3:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1038d6:	83 c0 28             	add    $0x28,%eax
  1038d9:	8b 40 08             	mov    0x8(%eax),%eax
  1038dc:	83 f8 03             	cmp    $0x3,%eax
  1038df:	74 24                	je     103905 <default_check+0x2c0>
  1038e1:	c7 44 24 0c 9c 69 10 	movl   $0x10699c,0xc(%esp)
  1038e8:	00 
  1038e9:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  1038f0:	00 
  1038f1:	c7 44 24 04 0a 01 00 	movl   $0x10a,0x4(%esp)
  1038f8:	00 
  1038f9:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103900:	e8 e9 d3 ff ff       	call   100cee <__panic>
    assert((p1 = alloc_pages(3)) != NULL);
  103905:	c7 04 24 03 00 00 00 	movl   $0x3,(%esp)
  10390c:	e8 f8 06 00 00       	call   104009 <alloc_pages>
  103911:	89 45 e0             	mov    %eax,-0x20(%ebp)
  103914:	83 7d e0 00          	cmpl   $0x0,-0x20(%ebp)
  103918:	75 24                	jne    10393e <default_check+0x2f9>
  10391a:	c7 44 24 0c c8 69 10 	movl   $0x1069c8,0xc(%esp)
  103921:	00 
  103922:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103929:	00 
  10392a:	c7 44 24 04 0b 01 00 	movl   $0x10b,0x4(%esp)
  103931:	00 
  103932:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103939:	e8 b0 d3 ff ff       	call   100cee <__panic>
    assert(alloc_page() == NULL);
  10393e:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  103945:	e8 bf 06 00 00       	call   104009 <alloc_pages>
  10394a:	85 c0                	test   %eax,%eax
  10394c:	74 24                	je     103972 <default_check+0x32d>
  10394e:	c7 44 24 0c de 68 10 	movl   $0x1068de,0xc(%esp)
  103955:	00 
  103956:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  10395d:	00 
  10395e:	c7 44 24 04 0c 01 00 	movl   $0x10c,0x4(%esp)
  103965:	00 
  103966:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  10396d:	e8 7c d3 ff ff       	call   100cee <__panic>
    assert(p0 + 2 == p1);
  103972:	8b 45 e8             	mov    -0x18(%ebp),%eax
  103975:	83 c0 28             	add    $0x28,%eax
  103978:	39 45 e0             	cmp    %eax,-0x20(%ebp)
  10397b:	74 24                	je     1039a1 <default_check+0x35c>
  10397d:	c7 44 24 0c e6 69 10 	movl   $0x1069e6,0xc(%esp)
  103984:	00 
  103985:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  10398c:	00 
  10398d:	c7 44 24 04 0d 01 00 	movl   $0x10d,0x4(%esp)
  103994:	00 
  103995:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  10399c:	e8 4d d3 ff ff       	call   100cee <__panic>

    p2 = p0 + 1;
  1039a1:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1039a4:	83 c0 14             	add    $0x14,%eax
  1039a7:	89 45 dc             	mov    %eax,-0x24(%ebp)
    free_page(p0);
  1039aa:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  1039b1:	00 
  1039b2:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1039b5:	89 04 24             	mov    %eax,(%esp)
  1039b8:	e8 86 06 00 00       	call   104043 <free_pages>
    free_pages(p1, 3);
  1039bd:	c7 44 24 04 03 00 00 	movl   $0x3,0x4(%esp)
  1039c4:	00 
  1039c5:	8b 45 e0             	mov    -0x20(%ebp),%eax
  1039c8:	89 04 24             	mov    %eax,(%esp)
  1039cb:	e8 73 06 00 00       	call   104043 <free_pages>
    assert(PageProperty(p0) && p0->property == 1);
  1039d0:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1039d3:	83 c0 04             	add    $0x4,%eax
  1039d6:	c7 45 a0 01 00 00 00 	movl   $0x1,-0x60(%ebp)
  1039dd:	89 45 9c             	mov    %eax,-0x64(%ebp)
    asm volatile ("btl %2, %1; sbbl %0,%0" : "=r" (oldbit) : "m" (*(volatile long *)addr), "Ir" (nr));
  1039e0:	8b 45 9c             	mov    -0x64(%ebp),%eax
  1039e3:	8b 55 a0             	mov    -0x60(%ebp),%edx
  1039e6:	0f a3 10             	bt     %edx,(%eax)
  1039e9:	19 c0                	sbb    %eax,%eax
  1039eb:	89 45 98             	mov    %eax,-0x68(%ebp)
    return oldbit != 0;
  1039ee:	83 7d 98 00          	cmpl   $0x0,-0x68(%ebp)
  1039f2:	0f 95 c0             	setne  %al
  1039f5:	0f b6 c0             	movzbl %al,%eax
  1039f8:	85 c0                	test   %eax,%eax
  1039fa:	74 0b                	je     103a07 <default_check+0x3c2>
  1039fc:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1039ff:	8b 40 08             	mov    0x8(%eax),%eax
  103a02:	83 f8 01             	cmp    $0x1,%eax
  103a05:	74 24                	je     103a2b <default_check+0x3e6>
  103a07:	c7 44 24 0c f4 69 10 	movl   $0x1069f4,0xc(%esp)
  103a0e:	00 
  103a0f:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103a16:	00 
  103a17:	c7 44 24 04 12 01 00 	movl   $0x112,0x4(%esp)
  103a1e:	00 
  103a1f:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103a26:	e8 c3 d2 ff ff       	call   100cee <__panic>
    assert(PageProperty(p1) && p1->property == 3);
  103a2b:	8b 45 e0             	mov    -0x20(%ebp),%eax
  103a2e:	83 c0 04             	add    $0x4,%eax
  103a31:	c7 45 94 01 00 00 00 	movl   $0x1,-0x6c(%ebp)
  103a38:	89 45 90             	mov    %eax,-0x70(%ebp)
    asm volatile ("btl %2, %1; sbbl %0,%0" : "=r" (oldbit) : "m" (*(volatile long *)addr), "Ir" (nr));
  103a3b:	8b 45 90             	mov    -0x70(%ebp),%eax
  103a3e:	8b 55 94             	mov    -0x6c(%ebp),%edx
  103a41:	0f a3 10             	bt     %edx,(%eax)
  103a44:	19 c0                	sbb    %eax,%eax
  103a46:	89 45 8c             	mov    %eax,-0x74(%ebp)
    return oldbit != 0;
  103a49:	83 7d 8c 00          	cmpl   $0x0,-0x74(%ebp)
  103a4d:	0f 95 c0             	setne  %al
  103a50:	0f b6 c0             	movzbl %al,%eax
  103a53:	85 c0                	test   %eax,%eax
  103a55:	74 0b                	je     103a62 <default_check+0x41d>
  103a57:	8b 45 e0             	mov    -0x20(%ebp),%eax
  103a5a:	8b 40 08             	mov    0x8(%eax),%eax
  103a5d:	83 f8 03             	cmp    $0x3,%eax
  103a60:	74 24                	je     103a86 <default_check+0x441>
  103a62:	c7 44 24 0c 1c 6a 10 	movl   $0x106a1c,0xc(%esp)
  103a69:	00 
  103a6a:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103a71:	00 
  103a72:	c7 44 24 04 13 01 00 	movl   $0x113,0x4(%esp)
  103a79:	00 
  103a7a:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103a81:	e8 68 d2 ff ff       	call   100cee <__panic>

    assert((p0 = alloc_page()) == p2 - 1);
  103a86:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  103a8d:	e8 77 05 00 00       	call   104009 <alloc_pages>
  103a92:	89 45 e8             	mov    %eax,-0x18(%ebp)
  103a95:	8b 45 dc             	mov    -0x24(%ebp),%eax
  103a98:	83 e8 14             	sub    $0x14,%eax
  103a9b:	39 45 e8             	cmp    %eax,-0x18(%ebp)
  103a9e:	74 24                	je     103ac4 <default_check+0x47f>
  103aa0:	c7 44 24 0c 42 6a 10 	movl   $0x106a42,0xc(%esp)
  103aa7:	00 
  103aa8:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103aaf:	00 
  103ab0:	c7 44 24 04 15 01 00 	movl   $0x115,0x4(%esp)
  103ab7:	00 
  103ab8:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103abf:	e8 2a d2 ff ff       	call   100cee <__panic>
    free_page(p0);
  103ac4:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  103acb:	00 
  103acc:	8b 45 e8             	mov    -0x18(%ebp),%eax
  103acf:	89 04 24             	mov    %eax,(%esp)
  103ad2:	e8 6c 05 00 00       	call   104043 <free_pages>
    assert((p0 = alloc_pages(2)) == p2 + 1);
  103ad7:	c7 04 24 02 00 00 00 	movl   $0x2,(%esp)
  103ade:	e8 26 05 00 00       	call   104009 <alloc_pages>
  103ae3:	89 45 e8             	mov    %eax,-0x18(%ebp)
  103ae6:	8b 45 dc             	mov    -0x24(%ebp),%eax
  103ae9:	83 c0 14             	add    $0x14,%eax
  103aec:	39 45 e8             	cmp    %eax,-0x18(%ebp)
  103aef:	74 24                	je     103b15 <default_check+0x4d0>
  103af1:	c7 44 24 0c 60 6a 10 	movl   $0x106a60,0xc(%esp)
  103af8:	00 
  103af9:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103b00:	00 
  103b01:	c7 44 24 04 17 01 00 	movl   $0x117,0x4(%esp)
  103b08:	00 
  103b09:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103b10:	e8 d9 d1 ff ff       	call   100cee <__panic>

    free_pages(p0, 2);
  103b15:	c7 44 24 04 02 00 00 	movl   $0x2,0x4(%esp)
  103b1c:	00 
  103b1d:	8b 45 e8             	mov    -0x18(%ebp),%eax
  103b20:	89 04 24             	mov    %eax,(%esp)
  103b23:	e8 1b 05 00 00       	call   104043 <free_pages>
    free_page(p2);
  103b28:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  103b2f:	00 
  103b30:	8b 45 dc             	mov    -0x24(%ebp),%eax
  103b33:	89 04 24             	mov    %eax,(%esp)
  103b36:	e8 08 05 00 00       	call   104043 <free_pages>

    assert((p0 = alloc_pages(5)) != NULL);
  103b3b:	c7 04 24 05 00 00 00 	movl   $0x5,(%esp)
  103b42:	e8 c2 04 00 00       	call   104009 <alloc_pages>
  103b47:	89 45 e8             	mov    %eax,-0x18(%ebp)
  103b4a:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  103b4e:	75 24                	jne    103b74 <default_check+0x52f>
  103b50:	c7 44 24 0c 80 6a 10 	movl   $0x106a80,0xc(%esp)
  103b57:	00 
  103b58:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103b5f:	00 
  103b60:	c7 44 24 04 1c 01 00 	movl   $0x11c,0x4(%esp)
  103b67:	00 
  103b68:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103b6f:	e8 7a d1 ff ff       	call   100cee <__panic>
    assert(alloc_page() == NULL);
  103b74:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  103b7b:	e8 89 04 00 00       	call   104009 <alloc_pages>
  103b80:	85 c0                	test   %eax,%eax
  103b82:	74 24                	je     103ba8 <default_check+0x563>
  103b84:	c7 44 24 0c de 68 10 	movl   $0x1068de,0xc(%esp)
  103b8b:	00 
  103b8c:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103b93:	00 
  103b94:	c7 44 24 04 1d 01 00 	movl   $0x11d,0x4(%esp)
  103b9b:	00 
  103b9c:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103ba3:	e8 46 d1 ff ff       	call   100cee <__panic>

    assert(nr_free == 0);
  103ba8:	a1 b0 ce 11 00       	mov    0x11ceb0,%eax
  103bad:	85 c0                	test   %eax,%eax
  103baf:	74 24                	je     103bd5 <default_check+0x590>
  103bb1:	c7 44 24 0c 31 69 10 	movl   $0x106931,0xc(%esp)
  103bb8:	00 
  103bb9:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103bc0:	00 
  103bc1:	c7 44 24 04 1f 01 00 	movl   $0x11f,0x4(%esp)
  103bc8:	00 
  103bc9:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103bd0:	e8 19 d1 ff ff       	call   100cee <__panic>
    nr_free = nr_free_store;
  103bd5:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  103bd8:	a3 b0 ce 11 00       	mov    %eax,0x11ceb0

    free_list = free_list_store;
  103bdd:	8b 45 80             	mov    -0x80(%ebp),%eax
  103be0:	8b 55 84             	mov    -0x7c(%ebp),%edx
  103be3:	a3 a8 ce 11 00       	mov    %eax,0x11cea8
  103be8:	89 15 ac ce 11 00    	mov    %edx,0x11ceac
    free_pages(p0, 5);
  103bee:	c7 44 24 04 05 00 00 	movl   $0x5,0x4(%esp)
  103bf5:	00 
  103bf6:	8b 45 e8             	mov    -0x18(%ebp),%eax
  103bf9:	89 04 24             	mov    %eax,(%esp)
  103bfc:	e8 42 04 00 00       	call   104043 <free_pages>

    le = &free_list;
  103c01:	c7 45 ec a8 ce 11 00 	movl   $0x11cea8,-0x14(%ebp)
    while ((le = list_next(le)) != &free_list) {
  103c08:	eb 5a                	jmp    103c64 <default_check+0x61f>
        assert(le->next->prev == le && le->prev->next == le);
  103c0a:	8b 45 ec             	mov    -0x14(%ebp),%eax
  103c0d:	8b 40 04             	mov    0x4(%eax),%eax
  103c10:	8b 00                	mov    (%eax),%eax
  103c12:	39 45 ec             	cmp    %eax,-0x14(%ebp)
  103c15:	75 0d                	jne    103c24 <default_check+0x5df>
  103c17:	8b 45 ec             	mov    -0x14(%ebp),%eax
  103c1a:	8b 00                	mov    (%eax),%eax
  103c1c:	8b 40 04             	mov    0x4(%eax),%eax
  103c1f:	39 45 ec             	cmp    %eax,-0x14(%ebp)
  103c22:	74 24                	je     103c48 <default_check+0x603>
  103c24:	c7 44 24 0c a0 6a 10 	movl   $0x106aa0,0xc(%esp)
  103c2b:	00 
  103c2c:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103c33:	00 
  103c34:	c7 44 24 04 27 01 00 	movl   $0x127,0x4(%esp)
  103c3b:	00 
  103c3c:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103c43:	e8 a6 d0 ff ff       	call   100cee <__panic>
        struct Page *p = le2page(le, page_link);
  103c48:	8b 45 ec             	mov    -0x14(%ebp),%eax
  103c4b:	83 e8 0c             	sub    $0xc,%eax
  103c4e:	89 45 d8             	mov    %eax,-0x28(%ebp)
        count --, total -= p->property;
  103c51:	ff 4d f4             	decl   -0xc(%ebp)
  103c54:	8b 55 f0             	mov    -0x10(%ebp),%edx
  103c57:	8b 45 d8             	mov    -0x28(%ebp),%eax
  103c5a:	8b 48 08             	mov    0x8(%eax),%ecx
  103c5d:	89 d0                	mov    %edx,%eax
  103c5f:	29 c8                	sub    %ecx,%eax
  103c61:	89 45 f0             	mov    %eax,-0x10(%ebp)
  103c64:	8b 45 ec             	mov    -0x14(%ebp),%eax
  103c67:	89 45 88             	mov    %eax,-0x78(%ebp)
    return listelm->next;
  103c6a:	8b 45 88             	mov    -0x78(%ebp),%eax
  103c6d:	8b 40 04             	mov    0x4(%eax),%eax
    while ((le = list_next(le)) != &free_list) {
  103c70:	89 45 ec             	mov    %eax,-0x14(%ebp)
  103c73:	81 7d ec a8 ce 11 00 	cmpl   $0x11cea8,-0x14(%ebp)
  103c7a:	75 8e                	jne    103c0a <default_check+0x5c5>
    }
    assert(count == 0);
  103c7c:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  103c80:	74 24                	je     103ca6 <default_check+0x661>
  103c82:	c7 44 24 0c cd 6a 10 	movl   $0x106acd,0xc(%esp)
  103c89:	00 
  103c8a:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103c91:	00 
  103c92:	c7 44 24 04 2b 01 00 	movl   $0x12b,0x4(%esp)
  103c99:	00 
  103c9a:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103ca1:	e8 48 d0 ff ff       	call   100cee <__panic>
    assert(total == 0);
  103ca6:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  103caa:	74 24                	je     103cd0 <default_check+0x68b>
  103cac:	c7 44 24 0c d8 6a 10 	movl   $0x106ad8,0xc(%esp)
  103cb3:	00 
  103cb4:	c7 44 24 08 56 67 10 	movl   $0x106756,0x8(%esp)
  103cbb:	00 
  103cbc:	c7 44 24 04 2c 01 00 	movl   $0x12c,0x4(%esp)
  103cc3:	00 
  103cc4:	c7 04 24 6b 67 10 00 	movl   $0x10676b,(%esp)
  103ccb:	e8 1e d0 ff ff       	call   100cee <__panic>
}
  103cd0:	90                   	nop
  103cd1:	89 ec                	mov    %ebp,%esp
  103cd3:	5d                   	pop    %ebp
  103cd4:	c3                   	ret    

00103cd5 <page2ppn>:
page2ppn(struct Page *page) {
  103cd5:	55                   	push   %ebp
  103cd6:	89 e5                	mov    %esp,%ebp
    return page - pages;
  103cd8:	8b 15 c0 ce 11 00    	mov    0x11cec0,%edx
  103cde:	8b 45 08             	mov    0x8(%ebp),%eax
  103ce1:	29 d0                	sub    %edx,%eax
  103ce3:	c1 f8 02             	sar    $0x2,%eax
  103ce6:	69 c0 cd cc cc cc    	imul   $0xcccccccd,%eax,%eax
}
  103cec:	5d                   	pop    %ebp
  103ced:	c3                   	ret    

00103cee <page2pa>:
page2pa(struct Page *page) {
  103cee:	55                   	push   %ebp
  103cef:	89 e5                	mov    %esp,%ebp
  103cf1:	83 ec 04             	sub    $0x4,%esp
    return page2ppn(page) << PGSHIFT;
  103cf4:	8b 45 08             	mov    0x8(%ebp),%eax
  103cf7:	89 04 24             	mov    %eax,(%esp)
  103cfa:	e8 d6 ff ff ff       	call   103cd5 <page2ppn>
  103cff:	c1 e0 0c             	shl    $0xc,%eax
}
  103d02:	89 ec                	mov    %ebp,%esp
  103d04:	5d                   	pop    %ebp
  103d05:	c3                   	ret    

00103d06 <pa2page>:
pa2page(uintptr_t pa) {
  103d06:	55                   	push   %ebp
  103d07:	89 e5                	mov    %esp,%ebp
  103d09:	83 ec 18             	sub    $0x18,%esp
    if (PPN(pa) >= npage) {
  103d0c:	8b 45 08             	mov    0x8(%ebp),%eax
  103d0f:	c1 e8 0c             	shr    $0xc,%eax
  103d12:	89 c2                	mov    %eax,%edx
  103d14:	a1 c4 ce 11 00       	mov    0x11cec4,%eax
  103d19:	39 c2                	cmp    %eax,%edx
  103d1b:	72 1c                	jb     103d39 <pa2page+0x33>
        panic("pa2page called with invalid pa");
  103d1d:	c7 44 24 08 14 6b 10 	movl   $0x106b14,0x8(%esp)
  103d24:	00 
  103d25:	c7 44 24 04 5a 00 00 	movl   $0x5a,0x4(%esp)
  103d2c:	00 
  103d2d:	c7 04 24 33 6b 10 00 	movl   $0x106b33,(%esp)
  103d34:	e8 b5 cf ff ff       	call   100cee <__panic>
    return &pages[PPN(pa)];
  103d39:	8b 0d c0 ce 11 00    	mov    0x11cec0,%ecx
  103d3f:	8b 45 08             	mov    0x8(%ebp),%eax
  103d42:	c1 e8 0c             	shr    $0xc,%eax
  103d45:	89 c2                	mov    %eax,%edx
  103d47:	89 d0                	mov    %edx,%eax
  103d49:	c1 e0 02             	shl    $0x2,%eax
  103d4c:	01 d0                	add    %edx,%eax
  103d4e:	c1 e0 02             	shl    $0x2,%eax
  103d51:	01 c8                	add    %ecx,%eax
}
  103d53:	89 ec                	mov    %ebp,%esp
  103d55:	5d                   	pop    %ebp
  103d56:	c3                   	ret    

00103d57 <page2kva>:
page2kva(struct Page *page) {
  103d57:	55                   	push   %ebp
  103d58:	89 e5                	mov    %esp,%ebp
  103d5a:	83 ec 28             	sub    $0x28,%esp
    return KADDR(page2pa(page));
  103d5d:	8b 45 08             	mov    0x8(%ebp),%eax
  103d60:	89 04 24             	mov    %eax,(%esp)
  103d63:	e8 86 ff ff ff       	call   103cee <page2pa>
  103d68:	89 45 f4             	mov    %eax,-0xc(%ebp)
  103d6b:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103d6e:	c1 e8 0c             	shr    $0xc,%eax
  103d71:	89 45 f0             	mov    %eax,-0x10(%ebp)
  103d74:	a1 c4 ce 11 00       	mov    0x11cec4,%eax
  103d79:	39 45 f0             	cmp    %eax,-0x10(%ebp)
  103d7c:	72 23                	jb     103da1 <page2kva+0x4a>
  103d7e:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103d81:	89 44 24 0c          	mov    %eax,0xc(%esp)
  103d85:	c7 44 24 08 44 6b 10 	movl   $0x106b44,0x8(%esp)
  103d8c:	00 
  103d8d:	c7 44 24 04 61 00 00 	movl   $0x61,0x4(%esp)
  103d94:	00 
  103d95:	c7 04 24 33 6b 10 00 	movl   $0x106b33,(%esp)
  103d9c:	e8 4d cf ff ff       	call   100cee <__panic>
  103da1:	8b 45 f4             	mov    -0xc(%ebp),%eax
  103da4:	2d 00 00 00 40       	sub    $0x40000000,%eax
}
  103da9:	89 ec                	mov    %ebp,%esp
  103dab:	5d                   	pop    %ebp
  103dac:	c3                   	ret    

00103dad <pte2page>:
pte2page(pte_t pte) {
  103dad:	55                   	push   %ebp
  103dae:	89 e5                	mov    %esp,%ebp
  103db0:	83 ec 18             	sub    $0x18,%esp
    if (!(pte & PTE_P)) {
  103db3:	8b 45 08             	mov    0x8(%ebp),%eax
  103db6:	83 e0 01             	and    $0x1,%eax
  103db9:	85 c0                	test   %eax,%eax
  103dbb:	75 1c                	jne    103dd9 <pte2page+0x2c>
        panic("pte2page called with invalid pte");
  103dbd:	c7 44 24 08 68 6b 10 	movl   $0x106b68,0x8(%esp)
  103dc4:	00 
  103dc5:	c7 44 24 04 6c 00 00 	movl   $0x6c,0x4(%esp)
  103dcc:	00 
  103dcd:	c7 04 24 33 6b 10 00 	movl   $0x106b33,(%esp)
  103dd4:	e8 15 cf ff ff       	call   100cee <__panic>
    return pa2page(PTE_ADDR(pte));
  103dd9:	8b 45 08             	mov    0x8(%ebp),%eax
  103ddc:	25 00 f0 ff ff       	and    $0xfffff000,%eax
  103de1:	89 04 24             	mov    %eax,(%esp)
  103de4:	e8 1d ff ff ff       	call   103d06 <pa2page>
}
  103de9:	89 ec                	mov    %ebp,%esp
  103deb:	5d                   	pop    %ebp
  103dec:	c3                   	ret    

00103ded <pde2page>:
pde2page(pde_t pde) {
  103ded:	55                   	push   %ebp
  103dee:	89 e5                	mov    %esp,%ebp
  103df0:	83 ec 18             	sub    $0x18,%esp
    return pa2page(PDE_ADDR(pde));
  103df3:	8b 45 08             	mov    0x8(%ebp),%eax
  103df6:	25 00 f0 ff ff       	and    $0xfffff000,%eax
  103dfb:	89 04 24             	mov    %eax,(%esp)
  103dfe:	e8 03 ff ff ff       	call   103d06 <pa2page>
}
  103e03:	89 ec                	mov    %ebp,%esp
  103e05:	5d                   	pop    %ebp
  103e06:	c3                   	ret    

00103e07 <page_ref>:
page_ref(struct Page *page) {
  103e07:	55                   	push   %ebp
  103e08:	89 e5                	mov    %esp,%ebp
    return page->ref;
  103e0a:	8b 45 08             	mov    0x8(%ebp),%eax
  103e0d:	8b 00                	mov    (%eax),%eax
}
  103e0f:	5d                   	pop    %ebp
  103e10:	c3                   	ret    

00103e11 <page_ref_inc>:

static inline int
page_ref_inc(struct Page *page) {
  103e11:	55                   	push   %ebp
  103e12:	89 e5                	mov    %esp,%ebp
    page->ref += 1;
  103e14:	8b 45 08             	mov    0x8(%ebp),%eax
  103e17:	8b 00                	mov    (%eax),%eax
  103e19:	8d 50 01             	lea    0x1(%eax),%edx
  103e1c:	8b 45 08             	mov    0x8(%ebp),%eax
  103e1f:	89 10                	mov    %edx,(%eax)
    return page->ref;
  103e21:	8b 45 08             	mov    0x8(%ebp),%eax
  103e24:	8b 00                	mov    (%eax),%eax
}
  103e26:	5d                   	pop    %ebp
  103e27:	c3                   	ret    

00103e28 <page_ref_dec>:

static inline int
page_ref_dec(struct Page *page) {
  103e28:	55                   	push   %ebp
  103e29:	89 e5                	mov    %esp,%ebp
    page->ref -= 1;
  103e2b:	8b 45 08             	mov    0x8(%ebp),%eax
  103e2e:	8b 00                	mov    (%eax),%eax
  103e30:	8d 50 ff             	lea    -0x1(%eax),%edx
  103e33:	8b 45 08             	mov    0x8(%ebp),%eax
  103e36:	89 10                	mov    %edx,(%eax)
    return page->ref;
  103e38:	8b 45 08             	mov    0x8(%ebp),%eax
  103e3b:	8b 00                	mov    (%eax),%eax
}
  103e3d:	5d                   	pop    %ebp
  103e3e:	c3                   	ret    

00103e3f <__intr_save>:
__intr_save(void) {
  103e3f:	55                   	push   %ebp
  103e40:	89 e5                	mov    %esp,%ebp
  103e42:	83 ec 18             	sub    $0x18,%esp
    asm volatile ("pushfl; popl %0" : "=r" (eflags));
  103e45:	9c                   	pushf  
  103e46:	58                   	pop    %eax
  103e47:	89 45 f4             	mov    %eax,-0xc(%ebp)
    return eflags;
  103e4a:	8b 45 f4             	mov    -0xc(%ebp),%eax
    if (read_eflags() & FL_IF) {
  103e4d:	25 00 02 00 00       	and    $0x200,%eax
  103e52:	85 c0                	test   %eax,%eax
  103e54:	74 0c                	je     103e62 <__intr_save+0x23>
        intr_disable();
  103e56:	e8 ec d8 ff ff       	call   101747 <intr_disable>
        return 1;
  103e5b:	b8 01 00 00 00       	mov    $0x1,%eax
  103e60:	eb 05                	jmp    103e67 <__intr_save+0x28>
    return 0;
  103e62:	b8 00 00 00 00       	mov    $0x0,%eax
}
  103e67:	89 ec                	mov    %ebp,%esp
  103e69:	5d                   	pop    %ebp
  103e6a:	c3                   	ret    

00103e6b <__intr_restore>:
__intr_restore(bool flag) {
  103e6b:	55                   	push   %ebp
  103e6c:	89 e5                	mov    %esp,%ebp
  103e6e:	83 ec 08             	sub    $0x8,%esp
    if (flag) {
  103e71:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  103e75:	74 05                	je     103e7c <__intr_restore+0x11>
        intr_enable();
  103e77:	e8 c3 d8 ff ff       	call   10173f <intr_enable>
}
  103e7c:	90                   	nop
  103e7d:	89 ec                	mov    %ebp,%esp
  103e7f:	5d                   	pop    %ebp
  103e80:	c3                   	ret    

00103e81 <lgdt>:
/* *
 * lgdt - load the global descriptor table register and reset the
 * data/code segement registers for kernel.
 * */
static inline void
lgdt(struct pseudodesc *pd) {
  103e81:	55                   	push   %ebp
  103e82:	89 e5                	mov    %esp,%ebp
    asm volatile ("lgdt (%0)" :: "r" (pd));
  103e84:	8b 45 08             	mov    0x8(%ebp),%eax
  103e87:	0f 01 10             	lgdtl  (%eax)
    asm volatile ("movw %%ax, %%gs" :: "a" (USER_DS));
  103e8a:	b8 23 00 00 00       	mov    $0x23,%eax
  103e8f:	8e e8                	mov    %eax,%gs
    asm volatile ("movw %%ax, %%fs" :: "a" (USER_DS));
  103e91:	b8 23 00 00 00       	mov    $0x23,%eax
  103e96:	8e e0                	mov    %eax,%fs
    asm volatile ("movw %%ax, %%es" :: "a" (KERNEL_DS));
  103e98:	b8 10 00 00 00       	mov    $0x10,%eax
  103e9d:	8e c0                	mov    %eax,%es
    asm volatile ("movw %%ax, %%ds" :: "a" (KERNEL_DS));
  103e9f:	b8 10 00 00 00       	mov    $0x10,%eax
  103ea4:	8e d8                	mov    %eax,%ds
    asm volatile ("movw %%ax, %%ss" :: "a" (KERNEL_DS));
  103ea6:	b8 10 00 00 00       	mov    $0x10,%eax
  103eab:	8e d0                	mov    %eax,%ss
    // reload cs
    asm volatile ("ljmp %0, $1f\n 1:\n" :: "i" (KERNEL_CS));
  103ead:	ea b4 3e 10 00 08 00 	ljmp   $0x8,$0x103eb4
}
  103eb4:	90                   	nop
  103eb5:	5d                   	pop    %ebp
  103eb6:	c3                   	ret    

00103eb7 <load_esp0>:
 * load_esp0 - change the ESP0 in default task state segment,
 * so that we can use different kernel stack when we trap frame
 * user to kernel.
 * */
void
load_esp0(uintptr_t esp0) {
  103eb7:	55                   	push   %ebp
  103eb8:	89 e5                	mov    %esp,%ebp
    ts.ts_esp0 = esp0;
  103eba:	8b 45 08             	mov    0x8(%ebp),%eax
  103ebd:	a3 e4 ce 11 00       	mov    %eax,0x11cee4
}
  103ec2:	90                   	nop
  103ec3:	5d                   	pop    %ebp
  103ec4:	c3                   	ret    

00103ec5 <gdt_init>:

/* gdt_init - initialize the default GDT and TSS */
static void
gdt_init(void) {
  103ec5:	55                   	push   %ebp
  103ec6:	89 e5                	mov    %esp,%ebp
  103ec8:	83 ec 14             	sub    $0x14,%esp
    // set boot kernel stack and default SS0
    load_esp0((uintptr_t)bootstacktop);
  103ecb:	b8 00 90 11 00       	mov    $0x119000,%eax
  103ed0:	89 04 24             	mov    %eax,(%esp)
  103ed3:	e8 df ff ff ff       	call   103eb7 <load_esp0>
    ts.ts_ss0 = KERNEL_DS;
  103ed8:	66 c7 05 e8 ce 11 00 	movw   $0x10,0x11cee8
  103edf:	10 00 

    // initialize the TSS filed of the gdt
    gdt[SEG_TSS] = SEGTSS(STS_T32A, (uintptr_t)&ts, sizeof(ts), DPL_KERNEL);
  103ee1:	66 c7 05 28 9a 11 00 	movw   $0x68,0x119a28
  103ee8:	68 00 
  103eea:	b8 e0 ce 11 00       	mov    $0x11cee0,%eax
  103eef:	0f b7 c0             	movzwl %ax,%eax
  103ef2:	66 a3 2a 9a 11 00    	mov    %ax,0x119a2a
  103ef8:	b8 e0 ce 11 00       	mov    $0x11cee0,%eax
  103efd:	c1 e8 10             	shr    $0x10,%eax
  103f00:	a2 2c 9a 11 00       	mov    %al,0x119a2c
  103f05:	0f b6 05 2d 9a 11 00 	movzbl 0x119a2d,%eax
  103f0c:	24 f0                	and    $0xf0,%al
  103f0e:	0c 09                	or     $0x9,%al
  103f10:	a2 2d 9a 11 00       	mov    %al,0x119a2d
  103f15:	0f b6 05 2d 9a 11 00 	movzbl 0x119a2d,%eax
  103f1c:	24 ef                	and    $0xef,%al
  103f1e:	a2 2d 9a 11 00       	mov    %al,0x119a2d
  103f23:	0f b6 05 2d 9a 11 00 	movzbl 0x119a2d,%eax
  103f2a:	24 9f                	and    $0x9f,%al
  103f2c:	a2 2d 9a 11 00       	mov    %al,0x119a2d
  103f31:	0f b6 05 2d 9a 11 00 	movzbl 0x119a2d,%eax
  103f38:	0c 80                	or     $0x80,%al
  103f3a:	a2 2d 9a 11 00       	mov    %al,0x119a2d
  103f3f:	0f b6 05 2e 9a 11 00 	movzbl 0x119a2e,%eax
  103f46:	24 f0                	and    $0xf0,%al
  103f48:	a2 2e 9a 11 00       	mov    %al,0x119a2e
  103f4d:	0f b6 05 2e 9a 11 00 	movzbl 0x119a2e,%eax
  103f54:	24 ef                	and    $0xef,%al
  103f56:	a2 2e 9a 11 00       	mov    %al,0x119a2e
  103f5b:	0f b6 05 2e 9a 11 00 	movzbl 0x119a2e,%eax
  103f62:	24 df                	and    $0xdf,%al
  103f64:	a2 2e 9a 11 00       	mov    %al,0x119a2e
  103f69:	0f b6 05 2e 9a 11 00 	movzbl 0x119a2e,%eax
  103f70:	0c 40                	or     $0x40,%al
  103f72:	a2 2e 9a 11 00       	mov    %al,0x119a2e
  103f77:	0f b6 05 2e 9a 11 00 	movzbl 0x119a2e,%eax
  103f7e:	24 7f                	and    $0x7f,%al
  103f80:	a2 2e 9a 11 00       	mov    %al,0x119a2e
  103f85:	b8 e0 ce 11 00       	mov    $0x11cee0,%eax
  103f8a:	c1 e8 18             	shr    $0x18,%eax
  103f8d:	a2 2f 9a 11 00       	mov    %al,0x119a2f

    // reload all segment registers
    lgdt(&gdt_pd);
  103f92:	c7 04 24 30 9a 11 00 	movl   $0x119a30,(%esp)
  103f99:	e8 e3 fe ff ff       	call   103e81 <lgdt>
  103f9e:	66 c7 45 fe 28 00    	movw   $0x28,-0x2(%ebp)
    asm volatile ("ltr %0" :: "r" (sel) : "memory");
  103fa4:	0f b7 45 fe          	movzwl -0x2(%ebp),%eax
  103fa8:	0f 00 d8             	ltr    %ax
}
  103fab:	90                   	nop

    // load the TSS
    ltr(GD_TSS);
}
  103fac:	90                   	nop
  103fad:	89 ec                	mov    %ebp,%esp
  103faf:	5d                   	pop    %ebp
  103fb0:	c3                   	ret    

00103fb1 <init_pmm_manager>:

//init_pmm_manager - initialize a pmm_manager instance
static void
init_pmm_manager(void) {
  103fb1:	55                   	push   %ebp
  103fb2:	89 e5                	mov    %esp,%ebp
  103fb4:	83 ec 18             	sub    $0x18,%esp
    pmm_manager = &default_pmm_manager;
  103fb7:	c7 05 cc ce 11 00 f8 	movl   $0x106af8,0x11cecc
  103fbe:	6a 10 00 
    cprintf("memory management: %s\n", pmm_manager->name);
  103fc1:	a1 cc ce 11 00       	mov    0x11cecc,%eax
  103fc6:	8b 00                	mov    (%eax),%eax
  103fc8:	89 44 24 04          	mov    %eax,0x4(%esp)
  103fcc:	c7 04 24 94 6b 10 00 	movl   $0x106b94,(%esp)
  103fd3:	e8 8e c3 ff ff       	call   100366 <cprintf>
    pmm_manager->init();
  103fd8:	a1 cc ce 11 00       	mov    0x11cecc,%eax
  103fdd:	8b 40 04             	mov    0x4(%eax),%eax
  103fe0:	ff d0                	call   *%eax
}
  103fe2:	90                   	nop
  103fe3:	89 ec                	mov    %ebp,%esp
  103fe5:	5d                   	pop    %ebp
  103fe6:	c3                   	ret    

00103fe7 <init_memmap>:

//init_memmap - call pmm->init_memmap to build Page struct for free memory  
static void
init_memmap(struct Page *base, size_t n) {
  103fe7:	55                   	push   %ebp
  103fe8:	89 e5                	mov    %esp,%ebp
  103fea:	83 ec 18             	sub    $0x18,%esp
    pmm_manager->init_memmap(base, n);
  103fed:	a1 cc ce 11 00       	mov    0x11cecc,%eax
  103ff2:	8b 40 08             	mov    0x8(%eax),%eax
  103ff5:	8b 55 0c             	mov    0xc(%ebp),%edx
  103ff8:	89 54 24 04          	mov    %edx,0x4(%esp)
  103ffc:	8b 55 08             	mov    0x8(%ebp),%edx
  103fff:	89 14 24             	mov    %edx,(%esp)
  104002:	ff d0                	call   *%eax
}
  104004:	90                   	nop
  104005:	89 ec                	mov    %ebp,%esp
  104007:	5d                   	pop    %ebp
  104008:	c3                   	ret    

00104009 <alloc_pages>:

//alloc_pages - call pmm->alloc_pages to allocate a continuous n*PAGESIZE memory 
struct Page *
alloc_pages(size_t n) {
  104009:	55                   	push   %ebp
  10400a:	89 e5                	mov    %esp,%ebp
  10400c:	83 ec 28             	sub    $0x28,%esp
    struct Page *page=NULL;
  10400f:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    bool intr_flag;
    local_intr_save(intr_flag);
  104016:	e8 24 fe ff ff       	call   103e3f <__intr_save>
  10401b:	89 45 f0             	mov    %eax,-0x10(%ebp)
    {
        page = pmm_manager->alloc_pages(n);
  10401e:	a1 cc ce 11 00       	mov    0x11cecc,%eax
  104023:	8b 40 0c             	mov    0xc(%eax),%eax
  104026:	8b 55 08             	mov    0x8(%ebp),%edx
  104029:	89 14 24             	mov    %edx,(%esp)
  10402c:	ff d0                	call   *%eax
  10402e:	89 45 f4             	mov    %eax,-0xc(%ebp)
    }
    local_intr_restore(intr_flag);
  104031:	8b 45 f0             	mov    -0x10(%ebp),%eax
  104034:	89 04 24             	mov    %eax,(%esp)
  104037:	e8 2f fe ff ff       	call   103e6b <__intr_restore>
    return page;
  10403c:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  10403f:	89 ec                	mov    %ebp,%esp
  104041:	5d                   	pop    %ebp
  104042:	c3                   	ret    

00104043 <free_pages>:

//free_pages - call pmm->free_pages to free a continuous n*PAGESIZE memory 
void
free_pages(struct Page *base, size_t n) {
  104043:	55                   	push   %ebp
  104044:	89 e5                	mov    %esp,%ebp
  104046:	83 ec 28             	sub    $0x28,%esp
    bool intr_flag;
    local_intr_save(intr_flag);
  104049:	e8 f1 fd ff ff       	call   103e3f <__intr_save>
  10404e:	89 45 f4             	mov    %eax,-0xc(%ebp)
    {
        pmm_manager->free_pages(base, n);
  104051:	a1 cc ce 11 00       	mov    0x11cecc,%eax
  104056:	8b 40 10             	mov    0x10(%eax),%eax
  104059:	8b 55 0c             	mov    0xc(%ebp),%edx
  10405c:	89 54 24 04          	mov    %edx,0x4(%esp)
  104060:	8b 55 08             	mov    0x8(%ebp),%edx
  104063:	89 14 24             	mov    %edx,(%esp)
  104066:	ff d0                	call   *%eax
    }
    local_intr_restore(intr_flag);
  104068:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10406b:	89 04 24             	mov    %eax,(%esp)
  10406e:	e8 f8 fd ff ff       	call   103e6b <__intr_restore>
}
  104073:	90                   	nop
  104074:	89 ec                	mov    %ebp,%esp
  104076:	5d                   	pop    %ebp
  104077:	c3                   	ret    

00104078 <nr_free_pages>:

//nr_free_pages - call pmm->nr_free_pages to get the size (nr*PAGESIZE) 
//of current free memory
size_t
nr_free_pages(void) {
  104078:	55                   	push   %ebp
  104079:	89 e5                	mov    %esp,%ebp
  10407b:	83 ec 28             	sub    $0x28,%esp
    size_t ret;
    bool intr_flag;
    local_intr_save(intr_flag);
  10407e:	e8 bc fd ff ff       	call   103e3f <__intr_save>
  104083:	89 45 f4             	mov    %eax,-0xc(%ebp)
    {
        ret = pmm_manager->nr_free_pages();
  104086:	a1 cc ce 11 00       	mov    0x11cecc,%eax
  10408b:	8b 40 14             	mov    0x14(%eax),%eax
  10408e:	ff d0                	call   *%eax
  104090:	89 45 f0             	mov    %eax,-0x10(%ebp)
    }
    local_intr_restore(intr_flag);
  104093:	8b 45 f4             	mov    -0xc(%ebp),%eax
  104096:	89 04 24             	mov    %eax,(%esp)
  104099:	e8 cd fd ff ff       	call   103e6b <__intr_restore>
    return ret;
  10409e:	8b 45 f0             	mov    -0x10(%ebp),%eax
}
  1040a1:	89 ec                	mov    %ebp,%esp
  1040a3:	5d                   	pop    %ebp
  1040a4:	c3                   	ret    

001040a5 <page_init>:

/* pmm_init - initialize the physical memory management */
static void
page_init(void) {
  1040a5:	55                   	push   %ebp
  1040a6:	89 e5                	mov    %esp,%ebp
  1040a8:	57                   	push   %edi
  1040a9:	56                   	push   %esi
  1040aa:	53                   	push   %ebx
  1040ab:	81 ec 9c 00 00 00    	sub    $0x9c,%esp
    struct e820map *memmap = (struct e820map *)(0x8000 + KERNBASE);
  1040b1:	c7 45 c4 00 80 00 c0 	movl   $0xc0008000,-0x3c(%ebp)
    uint64_t maxpa = 0;
  1040b8:	c7 45 e0 00 00 00 00 	movl   $0x0,-0x20(%ebp)
  1040bf:	c7 45 e4 00 00 00 00 	movl   $0x0,-0x1c(%ebp)

    cprintf("e820map:\n");
  1040c6:	c7 04 24 ab 6b 10 00 	movl   $0x106bab,(%esp)
  1040cd:	e8 94 c2 ff ff       	call   100366 <cprintf>
    int i;
    for (i = 0; i < memmap->nr_map; i ++) {
  1040d2:	c7 45 dc 00 00 00 00 	movl   $0x0,-0x24(%ebp)
  1040d9:	e9 0c 01 00 00       	jmp    1041ea <page_init+0x145>
        uint64_t begin = memmap->map[i].addr, end = begin + memmap->map[i].size;
  1040de:	8b 4d c4             	mov    -0x3c(%ebp),%ecx
  1040e1:	8b 55 dc             	mov    -0x24(%ebp),%edx
  1040e4:	89 d0                	mov    %edx,%eax
  1040e6:	c1 e0 02             	shl    $0x2,%eax
  1040e9:	01 d0                	add    %edx,%eax
  1040eb:	c1 e0 02             	shl    $0x2,%eax
  1040ee:	01 c8                	add    %ecx,%eax
  1040f0:	8b 50 08             	mov    0x8(%eax),%edx
  1040f3:	8b 40 04             	mov    0x4(%eax),%eax
  1040f6:	89 45 a0             	mov    %eax,-0x60(%ebp)
  1040f9:	89 55 a4             	mov    %edx,-0x5c(%ebp)
  1040fc:	8b 4d c4             	mov    -0x3c(%ebp),%ecx
  1040ff:	8b 55 dc             	mov    -0x24(%ebp),%edx
  104102:	89 d0                	mov    %edx,%eax
  104104:	c1 e0 02             	shl    $0x2,%eax
  104107:	01 d0                	add    %edx,%eax
  104109:	c1 e0 02             	shl    $0x2,%eax
  10410c:	01 c8                	add    %ecx,%eax
  10410e:	8b 48 0c             	mov    0xc(%eax),%ecx
  104111:	8b 58 10             	mov    0x10(%eax),%ebx
  104114:	8b 45 a0             	mov    -0x60(%ebp),%eax
  104117:	8b 55 a4             	mov    -0x5c(%ebp),%edx
  10411a:	01 c8                	add    %ecx,%eax
  10411c:	11 da                	adc    %ebx,%edx
  10411e:	89 45 98             	mov    %eax,-0x68(%ebp)
  104121:	89 55 9c             	mov    %edx,-0x64(%ebp)
        cprintf("  memory: %08llx, [%08llx, %08llx], type = %d.\n",
  104124:	8b 4d c4             	mov    -0x3c(%ebp),%ecx
  104127:	8b 55 dc             	mov    -0x24(%ebp),%edx
  10412a:	89 d0                	mov    %edx,%eax
  10412c:	c1 e0 02             	shl    $0x2,%eax
  10412f:	01 d0                	add    %edx,%eax
  104131:	c1 e0 02             	shl    $0x2,%eax
  104134:	01 c8                	add    %ecx,%eax
  104136:	83 c0 14             	add    $0x14,%eax
  104139:	8b 00                	mov    (%eax),%eax
  10413b:	89 85 7c ff ff ff    	mov    %eax,-0x84(%ebp)
  104141:	8b 45 98             	mov    -0x68(%ebp),%eax
  104144:	8b 55 9c             	mov    -0x64(%ebp),%edx
  104147:	83 c0 ff             	add    $0xffffffff,%eax
  10414a:	83 d2 ff             	adc    $0xffffffff,%edx
  10414d:	89 c6                	mov    %eax,%esi
  10414f:	89 d7                	mov    %edx,%edi
  104151:	8b 4d c4             	mov    -0x3c(%ebp),%ecx
  104154:	8b 55 dc             	mov    -0x24(%ebp),%edx
  104157:	89 d0                	mov    %edx,%eax
  104159:	c1 e0 02             	shl    $0x2,%eax
  10415c:	01 d0                	add    %edx,%eax
  10415e:	c1 e0 02             	shl    $0x2,%eax
  104161:	01 c8                	add    %ecx,%eax
  104163:	8b 48 0c             	mov    0xc(%eax),%ecx
  104166:	8b 58 10             	mov    0x10(%eax),%ebx
  104169:	8b 85 7c ff ff ff    	mov    -0x84(%ebp),%eax
  10416f:	89 44 24 1c          	mov    %eax,0x1c(%esp)
  104173:	89 74 24 14          	mov    %esi,0x14(%esp)
  104177:	89 7c 24 18          	mov    %edi,0x18(%esp)
  10417b:	8b 45 a0             	mov    -0x60(%ebp),%eax
  10417e:	8b 55 a4             	mov    -0x5c(%ebp),%edx
  104181:	89 44 24 0c          	mov    %eax,0xc(%esp)
  104185:	89 54 24 10          	mov    %edx,0x10(%esp)
  104189:	89 4c 24 04          	mov    %ecx,0x4(%esp)
  10418d:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  104191:	c7 04 24 b8 6b 10 00 	movl   $0x106bb8,(%esp)
  104198:	e8 c9 c1 ff ff       	call   100366 <cprintf>
                memmap->map[i].size, begin, end - 1, memmap->map[i].type);
        if (memmap->map[i].type == E820_ARM) {
  10419d:	8b 4d c4             	mov    -0x3c(%ebp),%ecx
  1041a0:	8b 55 dc             	mov    -0x24(%ebp),%edx
  1041a3:	89 d0                	mov    %edx,%eax
  1041a5:	c1 e0 02             	shl    $0x2,%eax
  1041a8:	01 d0                	add    %edx,%eax
  1041aa:	c1 e0 02             	shl    $0x2,%eax
  1041ad:	01 c8                	add    %ecx,%eax
  1041af:	83 c0 14             	add    $0x14,%eax
  1041b2:	8b 00                	mov    (%eax),%eax
  1041b4:	83 f8 01             	cmp    $0x1,%eax
  1041b7:	75 2e                	jne    1041e7 <page_init+0x142>
            if (maxpa < end && begin < KMEMSIZE) {
  1041b9:	8b 45 e0             	mov    -0x20(%ebp),%eax
  1041bc:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  1041bf:	3b 45 98             	cmp    -0x68(%ebp),%eax
  1041c2:	89 d0                	mov    %edx,%eax
  1041c4:	1b 45 9c             	sbb    -0x64(%ebp),%eax
  1041c7:	73 1e                	jae    1041e7 <page_init+0x142>
  1041c9:	ba ff ff ff 37       	mov    $0x37ffffff,%edx
  1041ce:	b8 00 00 00 00       	mov    $0x0,%eax
  1041d3:	3b 55 a0             	cmp    -0x60(%ebp),%edx
  1041d6:	1b 45 a4             	sbb    -0x5c(%ebp),%eax
  1041d9:	72 0c                	jb     1041e7 <page_init+0x142>
                maxpa = end;
  1041db:	8b 45 98             	mov    -0x68(%ebp),%eax
  1041de:	8b 55 9c             	mov    -0x64(%ebp),%edx
  1041e1:	89 45 e0             	mov    %eax,-0x20(%ebp)
  1041e4:	89 55 e4             	mov    %edx,-0x1c(%ebp)
    for (i = 0; i < memmap->nr_map; i ++) {
  1041e7:	ff 45 dc             	incl   -0x24(%ebp)
  1041ea:	8b 45 c4             	mov    -0x3c(%ebp),%eax
  1041ed:	8b 00                	mov    (%eax),%eax
  1041ef:	39 45 dc             	cmp    %eax,-0x24(%ebp)
  1041f2:	0f 8c e6 fe ff ff    	jl     1040de <page_init+0x39>
            }
        }
    }
    if (maxpa > KMEMSIZE) {
  1041f8:	ba 00 00 00 38       	mov    $0x38000000,%edx
  1041fd:	b8 00 00 00 00       	mov    $0x0,%eax
  104202:	3b 55 e0             	cmp    -0x20(%ebp),%edx
  104205:	1b 45 e4             	sbb    -0x1c(%ebp),%eax
  104208:	73 0e                	jae    104218 <page_init+0x173>
        maxpa = KMEMSIZE;
  10420a:	c7 45 e0 00 00 00 38 	movl   $0x38000000,-0x20(%ebp)
  104211:	c7 45 e4 00 00 00 00 	movl   $0x0,-0x1c(%ebp)
    }

    extern char end[];

    npage = maxpa / PGSIZE;
  104218:	8b 45 e0             	mov    -0x20(%ebp),%eax
  10421b:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  10421e:	0f ac d0 0c          	shrd   $0xc,%edx,%eax
  104222:	c1 ea 0c             	shr    $0xc,%edx
  104225:	a3 c4 ce 11 00       	mov    %eax,0x11cec4
    pages = (struct Page *)ROUNDUP((void *)end, PGSIZE);
  10422a:	c7 45 c0 00 10 00 00 	movl   $0x1000,-0x40(%ebp)
  104231:	b8 4c cf 11 00       	mov    $0x11cf4c,%eax
  104236:	8d 50 ff             	lea    -0x1(%eax),%edx
  104239:	8b 45 c0             	mov    -0x40(%ebp),%eax
  10423c:	01 d0                	add    %edx,%eax
  10423e:	89 45 bc             	mov    %eax,-0x44(%ebp)
  104241:	8b 45 bc             	mov    -0x44(%ebp),%eax
  104244:	ba 00 00 00 00       	mov    $0x0,%edx
  104249:	f7 75 c0             	divl   -0x40(%ebp)
  10424c:	8b 45 bc             	mov    -0x44(%ebp),%eax
  10424f:	29 d0                	sub    %edx,%eax
  104251:	a3 c0 ce 11 00       	mov    %eax,0x11cec0

    for (i = 0; i < npage; i ++) {
  104256:	c7 45 dc 00 00 00 00 	movl   $0x0,-0x24(%ebp)
  10425d:	eb 2f                	jmp    10428e <page_init+0x1e9>
        SetPageReserved(pages + i);
  10425f:	8b 0d c0 ce 11 00    	mov    0x11cec0,%ecx
  104265:	8b 55 dc             	mov    -0x24(%ebp),%edx
  104268:	89 d0                	mov    %edx,%eax
  10426a:	c1 e0 02             	shl    $0x2,%eax
  10426d:	01 d0                	add    %edx,%eax
  10426f:	c1 e0 02             	shl    $0x2,%eax
  104272:	01 c8                	add    %ecx,%eax
  104274:	83 c0 04             	add    $0x4,%eax
  104277:	c7 45 94 00 00 00 00 	movl   $0x0,-0x6c(%ebp)
  10427e:	89 45 90             	mov    %eax,-0x70(%ebp)
    asm volatile ("btsl %1, %0" :"=m" (*(volatile long *)addr) : "Ir" (nr));
  104281:	8b 45 90             	mov    -0x70(%ebp),%eax
  104284:	8b 55 94             	mov    -0x6c(%ebp),%edx
  104287:	0f ab 10             	bts    %edx,(%eax)
}
  10428a:	90                   	nop
    for (i = 0; i < npage; i ++) {
  10428b:	ff 45 dc             	incl   -0x24(%ebp)
  10428e:	8b 55 dc             	mov    -0x24(%ebp),%edx
  104291:	a1 c4 ce 11 00       	mov    0x11cec4,%eax
  104296:	39 c2                	cmp    %eax,%edx
  104298:	72 c5                	jb     10425f <page_init+0x1ba>
    }

    uintptr_t freemem = PADDR((uintptr_t)pages + sizeof(struct Page) * npage);
  10429a:	8b 15 c4 ce 11 00    	mov    0x11cec4,%edx
  1042a0:	89 d0                	mov    %edx,%eax
  1042a2:	c1 e0 02             	shl    $0x2,%eax
  1042a5:	01 d0                	add    %edx,%eax
  1042a7:	c1 e0 02             	shl    $0x2,%eax
  1042aa:	89 c2                	mov    %eax,%edx
  1042ac:	a1 c0 ce 11 00       	mov    0x11cec0,%eax
  1042b1:	01 d0                	add    %edx,%eax
  1042b3:	89 45 b8             	mov    %eax,-0x48(%ebp)
  1042b6:	81 7d b8 ff ff ff bf 	cmpl   $0xbfffffff,-0x48(%ebp)
  1042bd:	77 23                	ja     1042e2 <page_init+0x23d>
  1042bf:	8b 45 b8             	mov    -0x48(%ebp),%eax
  1042c2:	89 44 24 0c          	mov    %eax,0xc(%esp)
  1042c6:	c7 44 24 08 e8 6b 10 	movl   $0x106be8,0x8(%esp)
  1042cd:	00 
  1042ce:	c7 44 24 04 dc 00 00 	movl   $0xdc,0x4(%esp)
  1042d5:	00 
  1042d6:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  1042dd:	e8 0c ca ff ff       	call   100cee <__panic>
  1042e2:	8b 45 b8             	mov    -0x48(%ebp),%eax
  1042e5:	05 00 00 00 40       	add    $0x40000000,%eax
  1042ea:	89 45 b4             	mov    %eax,-0x4c(%ebp)

    for (i = 0; i < memmap->nr_map; i ++) {
  1042ed:	c7 45 dc 00 00 00 00 	movl   $0x0,-0x24(%ebp)
  1042f4:	e9 53 01 00 00       	jmp    10444c <page_init+0x3a7>
        uint64_t begin = memmap->map[i].addr, end = begin + memmap->map[i].size;
  1042f9:	8b 4d c4             	mov    -0x3c(%ebp),%ecx
  1042fc:	8b 55 dc             	mov    -0x24(%ebp),%edx
  1042ff:	89 d0                	mov    %edx,%eax
  104301:	c1 e0 02             	shl    $0x2,%eax
  104304:	01 d0                	add    %edx,%eax
  104306:	c1 e0 02             	shl    $0x2,%eax
  104309:	01 c8                	add    %ecx,%eax
  10430b:	8b 50 08             	mov    0x8(%eax),%edx
  10430e:	8b 40 04             	mov    0x4(%eax),%eax
  104311:	89 45 d0             	mov    %eax,-0x30(%ebp)
  104314:	89 55 d4             	mov    %edx,-0x2c(%ebp)
  104317:	8b 4d c4             	mov    -0x3c(%ebp),%ecx
  10431a:	8b 55 dc             	mov    -0x24(%ebp),%edx
  10431d:	89 d0                	mov    %edx,%eax
  10431f:	c1 e0 02             	shl    $0x2,%eax
  104322:	01 d0                	add    %edx,%eax
  104324:	c1 e0 02             	shl    $0x2,%eax
  104327:	01 c8                	add    %ecx,%eax
  104329:	8b 48 0c             	mov    0xc(%eax),%ecx
  10432c:	8b 58 10             	mov    0x10(%eax),%ebx
  10432f:	8b 45 d0             	mov    -0x30(%ebp),%eax
  104332:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  104335:	01 c8                	add    %ecx,%eax
  104337:	11 da                	adc    %ebx,%edx
  104339:	89 45 c8             	mov    %eax,-0x38(%ebp)
  10433c:	89 55 cc             	mov    %edx,-0x34(%ebp)
        if (memmap->map[i].type == E820_ARM) {
  10433f:	8b 4d c4             	mov    -0x3c(%ebp),%ecx
  104342:	8b 55 dc             	mov    -0x24(%ebp),%edx
  104345:	89 d0                	mov    %edx,%eax
  104347:	c1 e0 02             	shl    $0x2,%eax
  10434a:	01 d0                	add    %edx,%eax
  10434c:	c1 e0 02             	shl    $0x2,%eax
  10434f:	01 c8                	add    %ecx,%eax
  104351:	83 c0 14             	add    $0x14,%eax
  104354:	8b 00                	mov    (%eax),%eax
  104356:	83 f8 01             	cmp    $0x1,%eax
  104359:	0f 85 ea 00 00 00    	jne    104449 <page_init+0x3a4>
            if (begin < freemem) {
  10435f:	8b 45 b4             	mov    -0x4c(%ebp),%eax
  104362:	ba 00 00 00 00       	mov    $0x0,%edx
  104367:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
  10436a:	39 45 d0             	cmp    %eax,-0x30(%ebp)
  10436d:	19 d1                	sbb    %edx,%ecx
  10436f:	73 0d                	jae    10437e <page_init+0x2d9>
                begin = freemem;
  104371:	8b 45 b4             	mov    -0x4c(%ebp),%eax
  104374:	89 45 d0             	mov    %eax,-0x30(%ebp)
  104377:	c7 45 d4 00 00 00 00 	movl   $0x0,-0x2c(%ebp)
            }
            if (end > KMEMSIZE) {
  10437e:	ba 00 00 00 38       	mov    $0x38000000,%edx
  104383:	b8 00 00 00 00       	mov    $0x0,%eax
  104388:	3b 55 c8             	cmp    -0x38(%ebp),%edx
  10438b:	1b 45 cc             	sbb    -0x34(%ebp),%eax
  10438e:	73 0e                	jae    10439e <page_init+0x2f9>
                end = KMEMSIZE;
  104390:	c7 45 c8 00 00 00 38 	movl   $0x38000000,-0x38(%ebp)
  104397:	c7 45 cc 00 00 00 00 	movl   $0x0,-0x34(%ebp)
            }
            if (begin < end) {
  10439e:	8b 45 d0             	mov    -0x30(%ebp),%eax
  1043a1:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  1043a4:	3b 45 c8             	cmp    -0x38(%ebp),%eax
  1043a7:	89 d0                	mov    %edx,%eax
  1043a9:	1b 45 cc             	sbb    -0x34(%ebp),%eax
  1043ac:	0f 83 97 00 00 00    	jae    104449 <page_init+0x3a4>
                begin = ROUNDUP(begin, PGSIZE);
  1043b2:	c7 45 b0 00 10 00 00 	movl   $0x1000,-0x50(%ebp)
  1043b9:	8b 55 d0             	mov    -0x30(%ebp),%edx
  1043bc:	8b 45 b0             	mov    -0x50(%ebp),%eax
  1043bf:	01 d0                	add    %edx,%eax
  1043c1:	48                   	dec    %eax
  1043c2:	89 45 ac             	mov    %eax,-0x54(%ebp)
  1043c5:	8b 45 ac             	mov    -0x54(%ebp),%eax
  1043c8:	ba 00 00 00 00       	mov    $0x0,%edx
  1043cd:	f7 75 b0             	divl   -0x50(%ebp)
  1043d0:	8b 45 ac             	mov    -0x54(%ebp),%eax
  1043d3:	29 d0                	sub    %edx,%eax
  1043d5:	ba 00 00 00 00       	mov    $0x0,%edx
  1043da:	89 45 d0             	mov    %eax,-0x30(%ebp)
  1043dd:	89 55 d4             	mov    %edx,-0x2c(%ebp)
                end = ROUNDDOWN(end, PGSIZE);
  1043e0:	8b 45 c8             	mov    -0x38(%ebp),%eax
  1043e3:	89 45 a8             	mov    %eax,-0x58(%ebp)
  1043e6:	8b 45 a8             	mov    -0x58(%ebp),%eax
  1043e9:	ba 00 00 00 00       	mov    $0x0,%edx
  1043ee:	89 c7                	mov    %eax,%edi
  1043f0:	81 e7 00 f0 ff ff    	and    $0xfffff000,%edi
  1043f6:	89 7d 80             	mov    %edi,-0x80(%ebp)
  1043f9:	89 d0                	mov    %edx,%eax
  1043fb:	83 e0 00             	and    $0x0,%eax
  1043fe:	89 45 84             	mov    %eax,-0x7c(%ebp)
  104401:	8b 45 80             	mov    -0x80(%ebp),%eax
  104404:	8b 55 84             	mov    -0x7c(%ebp),%edx
  104407:	89 45 c8             	mov    %eax,-0x38(%ebp)
  10440a:	89 55 cc             	mov    %edx,-0x34(%ebp)
                if (begin < end) {
  10440d:	8b 45 d0             	mov    -0x30(%ebp),%eax
  104410:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  104413:	3b 45 c8             	cmp    -0x38(%ebp),%eax
  104416:	89 d0                	mov    %edx,%eax
  104418:	1b 45 cc             	sbb    -0x34(%ebp),%eax
  10441b:	73 2c                	jae    104449 <page_init+0x3a4>
                    init_memmap(pa2page(begin), (end - begin) / PGSIZE);
  10441d:	8b 45 c8             	mov    -0x38(%ebp),%eax
  104420:	8b 55 cc             	mov    -0x34(%ebp),%edx
  104423:	2b 45 d0             	sub    -0x30(%ebp),%eax
  104426:	1b 55 d4             	sbb    -0x2c(%ebp),%edx
  104429:	0f ac d0 0c          	shrd   $0xc,%edx,%eax
  10442d:	c1 ea 0c             	shr    $0xc,%edx
  104430:	89 c3                	mov    %eax,%ebx
  104432:	8b 45 d0             	mov    -0x30(%ebp),%eax
  104435:	89 04 24             	mov    %eax,(%esp)
  104438:	e8 c9 f8 ff ff       	call   103d06 <pa2page>
  10443d:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  104441:	89 04 24             	mov    %eax,(%esp)
  104444:	e8 9e fb ff ff       	call   103fe7 <init_memmap>
    for (i = 0; i < memmap->nr_map; i ++) {
  104449:	ff 45 dc             	incl   -0x24(%ebp)
  10444c:	8b 45 c4             	mov    -0x3c(%ebp),%eax
  10444f:	8b 00                	mov    (%eax),%eax
  104451:	39 45 dc             	cmp    %eax,-0x24(%ebp)
  104454:	0f 8c 9f fe ff ff    	jl     1042f9 <page_init+0x254>
                }
            }
        }
    }
}
  10445a:	90                   	nop
  10445b:	90                   	nop
  10445c:	81 c4 9c 00 00 00    	add    $0x9c,%esp
  104462:	5b                   	pop    %ebx
  104463:	5e                   	pop    %esi
  104464:	5f                   	pop    %edi
  104465:	5d                   	pop    %ebp
  104466:	c3                   	ret    

00104467 <boot_map_segment>:
//  la:   linear address of this memory need to map (after x86 segment map)
//  size: memory size
//  pa:   physical address of this memory
//  perm: permission of this memory  
static void
boot_map_segment(pde_t *pgdir, uintptr_t la, size_t size, uintptr_t pa, uint32_t perm) {
  104467:	55                   	push   %ebp
  104468:	89 e5                	mov    %esp,%ebp
  10446a:	83 ec 38             	sub    $0x38,%esp
    assert(PGOFF(la) == PGOFF(pa));
  10446d:	8b 45 0c             	mov    0xc(%ebp),%eax
  104470:	33 45 14             	xor    0x14(%ebp),%eax
  104473:	25 ff 0f 00 00       	and    $0xfff,%eax
  104478:	85 c0                	test   %eax,%eax
  10447a:	74 24                	je     1044a0 <boot_map_segment+0x39>
  10447c:	c7 44 24 0c 1a 6c 10 	movl   $0x106c1a,0xc(%esp)
  104483:	00 
  104484:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  10448b:	00 
  10448c:	c7 44 24 04 fa 00 00 	movl   $0xfa,0x4(%esp)
  104493:	00 
  104494:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  10449b:	e8 4e c8 ff ff       	call   100cee <__panic>
    size_t n = ROUNDUP(size + PGOFF(la), PGSIZE) / PGSIZE;
  1044a0:	c7 45 f0 00 10 00 00 	movl   $0x1000,-0x10(%ebp)
  1044a7:	8b 45 0c             	mov    0xc(%ebp),%eax
  1044aa:	25 ff 0f 00 00       	and    $0xfff,%eax
  1044af:	89 c2                	mov    %eax,%edx
  1044b1:	8b 45 10             	mov    0x10(%ebp),%eax
  1044b4:	01 c2                	add    %eax,%edx
  1044b6:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1044b9:	01 d0                	add    %edx,%eax
  1044bb:	48                   	dec    %eax
  1044bc:	89 45 ec             	mov    %eax,-0x14(%ebp)
  1044bf:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1044c2:	ba 00 00 00 00       	mov    $0x0,%edx
  1044c7:	f7 75 f0             	divl   -0x10(%ebp)
  1044ca:	8b 45 ec             	mov    -0x14(%ebp),%eax
  1044cd:	29 d0                	sub    %edx,%eax
  1044cf:	c1 e8 0c             	shr    $0xc,%eax
  1044d2:	89 45 f4             	mov    %eax,-0xc(%ebp)
    la = ROUNDDOWN(la, PGSIZE);
  1044d5:	8b 45 0c             	mov    0xc(%ebp),%eax
  1044d8:	89 45 e8             	mov    %eax,-0x18(%ebp)
  1044db:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1044de:	25 00 f0 ff ff       	and    $0xfffff000,%eax
  1044e3:	89 45 0c             	mov    %eax,0xc(%ebp)
    pa = ROUNDDOWN(pa, PGSIZE);
  1044e6:	8b 45 14             	mov    0x14(%ebp),%eax
  1044e9:	89 45 e4             	mov    %eax,-0x1c(%ebp)
  1044ec:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1044ef:	25 00 f0 ff ff       	and    $0xfffff000,%eax
  1044f4:	89 45 14             	mov    %eax,0x14(%ebp)
    for (; n > 0; n --, la += PGSIZE, pa += PGSIZE) {
  1044f7:	eb 68                	jmp    104561 <boot_map_segment+0xfa>
        pte_t *ptep = get_pte(pgdir, la, 1);
  1044f9:	c7 44 24 08 01 00 00 	movl   $0x1,0x8(%esp)
  104500:	00 
  104501:	8b 45 0c             	mov    0xc(%ebp),%eax
  104504:	89 44 24 04          	mov    %eax,0x4(%esp)
  104508:	8b 45 08             	mov    0x8(%ebp),%eax
  10450b:	89 04 24             	mov    %eax,(%esp)
  10450e:	e8 88 01 00 00       	call   10469b <get_pte>
  104513:	89 45 e0             	mov    %eax,-0x20(%ebp)
        assert(ptep != NULL);
  104516:	83 7d e0 00          	cmpl   $0x0,-0x20(%ebp)
  10451a:	75 24                	jne    104540 <boot_map_segment+0xd9>
  10451c:	c7 44 24 0c 46 6c 10 	movl   $0x106c46,0xc(%esp)
  104523:	00 
  104524:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  10452b:	00 
  10452c:	c7 44 24 04 00 01 00 	movl   $0x100,0x4(%esp)
  104533:	00 
  104534:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  10453b:	e8 ae c7 ff ff       	call   100cee <__panic>
        *ptep = pa | PTE_P | perm;
  104540:	8b 45 14             	mov    0x14(%ebp),%eax
  104543:	0b 45 18             	or     0x18(%ebp),%eax
  104546:	83 c8 01             	or     $0x1,%eax
  104549:	89 c2                	mov    %eax,%edx
  10454b:	8b 45 e0             	mov    -0x20(%ebp),%eax
  10454e:	89 10                	mov    %edx,(%eax)
    for (; n > 0; n --, la += PGSIZE, pa += PGSIZE) {
  104550:	ff 4d f4             	decl   -0xc(%ebp)
  104553:	81 45 0c 00 10 00 00 	addl   $0x1000,0xc(%ebp)
  10455a:	81 45 14 00 10 00 00 	addl   $0x1000,0x14(%ebp)
  104561:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  104565:	75 92                	jne    1044f9 <boot_map_segment+0x92>
    }
}
  104567:	90                   	nop
  104568:	90                   	nop
  104569:	89 ec                	mov    %ebp,%esp
  10456b:	5d                   	pop    %ebp
  10456c:	c3                   	ret    

0010456d <boot_alloc_page>:

//boot_alloc_page - allocate one page using pmm->alloc_pages(1) 
// return value: the kernel virtual address of this allocated page
//note: this function is used to get the memory for PDT(Page Directory Table)&PT(Page Table)
static void *
boot_alloc_page(void) {
  10456d:	55                   	push   %ebp
  10456e:	89 e5                	mov    %esp,%ebp
  104570:	83 ec 28             	sub    $0x28,%esp
    struct Page *p = alloc_page();
  104573:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  10457a:	e8 8a fa ff ff       	call   104009 <alloc_pages>
  10457f:	89 45 f4             	mov    %eax,-0xc(%ebp)
    if (p == NULL) {
  104582:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  104586:	75 1c                	jne    1045a4 <boot_alloc_page+0x37>
        panic("boot_alloc_page failed.\n");
  104588:	c7 44 24 08 53 6c 10 	movl   $0x106c53,0x8(%esp)
  10458f:	00 
  104590:	c7 44 24 04 0c 01 00 	movl   $0x10c,0x4(%esp)
  104597:	00 
  104598:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  10459f:	e8 4a c7 ff ff       	call   100cee <__panic>
    }
    return page2kva(p);
  1045a4:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1045a7:	89 04 24             	mov    %eax,(%esp)
  1045aa:	e8 a8 f7 ff ff       	call   103d57 <page2kva>
}
  1045af:	89 ec                	mov    %ebp,%esp
  1045b1:	5d                   	pop    %ebp
  1045b2:	c3                   	ret    

001045b3 <pmm_init>:

//pmm_init - setup a pmm to manage physical memory, build PDT&PT to setup paging mechanism 
//         - check the correctness of pmm & paging mechanism, print PDT&PT
void
pmm_init(void) {
  1045b3:	55                   	push   %ebp
  1045b4:	89 e5                	mov    %esp,%ebp
  1045b6:	83 ec 38             	sub    $0x38,%esp
    // We've already enabled paging
    boot_cr3 = PADDR(boot_pgdir);
  1045b9:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  1045be:	89 45 f4             	mov    %eax,-0xc(%ebp)
  1045c1:	81 7d f4 ff ff ff bf 	cmpl   $0xbfffffff,-0xc(%ebp)
  1045c8:	77 23                	ja     1045ed <pmm_init+0x3a>
  1045ca:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1045cd:	89 44 24 0c          	mov    %eax,0xc(%esp)
  1045d1:	c7 44 24 08 e8 6b 10 	movl   $0x106be8,0x8(%esp)
  1045d8:	00 
  1045d9:	c7 44 24 04 16 01 00 	movl   $0x116,0x4(%esp)
  1045e0:	00 
  1045e1:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  1045e8:	e8 01 c7 ff ff       	call   100cee <__panic>
  1045ed:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1045f0:	05 00 00 00 40       	add    $0x40000000,%eax
  1045f5:	a3 c8 ce 11 00       	mov    %eax,0x11cec8
    //We need to alloc/free the physical memory (granularity is 4KB or other size). 
    //So a framework of physical memory manager (struct pmm_manager)is defined in pmm.h
    //First we should init a physical memory manager(pmm) based on the framework.
    //Then pmm can alloc/free the physical memory. 
    //Now the first_fit/best_fit/worst_fit/buddy_system pmm are available.
    init_pmm_manager();
  1045fa:	e8 b2 f9 ff ff       	call   103fb1 <init_pmm_manager>

    // detect physical memory space, reserve already used memory,
    // then use pmm->init_memmap to create free page list
    page_init();
  1045ff:	e8 a1 fa ff ff       	call   1040a5 <page_init>

    //use pmm->check to verify the correctness of the alloc/free function in a pmm
    check_alloc_page();
  104604:	e8 5a 02 00 00       	call   104863 <check_alloc_page>

    check_pgdir();
  104609:	e8 76 02 00 00       	call   104884 <check_pgdir>

    static_assert(KERNBASE % PTSIZE == 0 && KERNTOP % PTSIZE == 0);

    // recursively insert boot_pgdir in itself
    // to form a virtual page table at virtual address VPT
    boot_pgdir[PDX(VPT)] = PADDR(boot_pgdir) | PTE_P | PTE_W;
  10460e:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104613:	89 45 f0             	mov    %eax,-0x10(%ebp)
  104616:	81 7d f0 ff ff ff bf 	cmpl   $0xbfffffff,-0x10(%ebp)
  10461d:	77 23                	ja     104642 <pmm_init+0x8f>
  10461f:	8b 45 f0             	mov    -0x10(%ebp),%eax
  104622:	89 44 24 0c          	mov    %eax,0xc(%esp)
  104626:	c7 44 24 08 e8 6b 10 	movl   $0x106be8,0x8(%esp)
  10462d:	00 
  10462e:	c7 44 24 04 2c 01 00 	movl   $0x12c,0x4(%esp)
  104635:	00 
  104636:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  10463d:	e8 ac c6 ff ff       	call   100cee <__panic>
  104642:	8b 45 f0             	mov    -0x10(%ebp),%eax
  104645:	8d 90 00 00 00 40    	lea    0x40000000(%eax),%edx
  10464b:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104650:	05 ac 0f 00 00       	add    $0xfac,%eax
  104655:	83 ca 03             	or     $0x3,%edx
  104658:	89 10                	mov    %edx,(%eax)

    // map all physical memory to linear memory with base linear addr KERNBASE
    // linear_addr KERNBASE ~ KERNBASE + KMEMSIZE = phy_addr 0 ~ KMEMSIZE
    boot_map_segment(boot_pgdir, KERNBASE, KMEMSIZE, 0, PTE_W);
  10465a:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  10465f:	c7 44 24 10 02 00 00 	movl   $0x2,0x10(%esp)
  104666:	00 
  104667:	c7 44 24 0c 00 00 00 	movl   $0x0,0xc(%esp)
  10466e:	00 
  10466f:	c7 44 24 08 00 00 00 	movl   $0x38000000,0x8(%esp)
  104676:	38 
  104677:	c7 44 24 04 00 00 00 	movl   $0xc0000000,0x4(%esp)
  10467e:	c0 
  10467f:	89 04 24             	mov    %eax,(%esp)
  104682:	e8 e0 fd ff ff       	call   104467 <boot_map_segment>

    // Since we are using bootloader's GDT,
    // we should reload gdt (second time, the last time) to get user segments and the TSS
    // map virtual_addr 0 ~ 4G = linear_addr 0 ~ 4G
    // then set kernel stack (ss:esp) in TSS, setup TSS in gdt, load TSS
    gdt_init();
  104687:	e8 39 f8 ff ff       	call   103ec5 <gdt_init>

    //now the basic virtual memory map(see memalyout.h) is established.
    //check the correctness of the basic virtual memory map.
    check_boot_pgdir();
  10468c:	e8 91 08 00 00       	call   104f22 <check_boot_pgdir>

    print_pgdir();
  104691:	e8 0e 0d 00 00       	call   1053a4 <print_pgdir>

}
  104696:	90                   	nop
  104697:	89 ec                	mov    %ebp,%esp
  104699:	5d                   	pop    %ebp
  10469a:	c3                   	ret    

0010469b <get_pte>:
//  pgdir:  the kernel virtual base address of PDT
//  la:     the linear address need to map
//  create: a logical value to decide if alloc a page for PT
// return vaule: the kernel virtual address of this pte
pte_t *
get_pte(pde_t *pgdir, uintptr_t la, bool create) {
  10469b:	55                   	push   %ebp
  10469c:	89 e5                	mov    %esp,%ebp
                          // (6) clear page content using memset
                          // (7) set page directory entry's permission
    }
    return NULL;          // (8) return page table entry
#endif
}
  10469e:	90                   	nop
  10469f:	5d                   	pop    %ebp
  1046a0:	c3                   	ret    

001046a1 <get_page>:

//get_page - get related Page struct for linear address la using PDT pgdir
struct Page *
get_page(pde_t *pgdir, uintptr_t la, pte_t **ptep_store) {
  1046a1:	55                   	push   %ebp
  1046a2:	89 e5                	mov    %esp,%ebp
  1046a4:	83 ec 28             	sub    $0x28,%esp
    pte_t *ptep = get_pte(pgdir, la, 0);
  1046a7:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  1046ae:	00 
  1046af:	8b 45 0c             	mov    0xc(%ebp),%eax
  1046b2:	89 44 24 04          	mov    %eax,0x4(%esp)
  1046b6:	8b 45 08             	mov    0x8(%ebp),%eax
  1046b9:	89 04 24             	mov    %eax,(%esp)
  1046bc:	e8 da ff ff ff       	call   10469b <get_pte>
  1046c1:	89 45 f4             	mov    %eax,-0xc(%ebp)
    if (ptep_store != NULL) {
  1046c4:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  1046c8:	74 08                	je     1046d2 <get_page+0x31>
        *ptep_store = ptep;
  1046ca:	8b 45 10             	mov    0x10(%ebp),%eax
  1046cd:	8b 55 f4             	mov    -0xc(%ebp),%edx
  1046d0:	89 10                	mov    %edx,(%eax)
    }
    if (ptep != NULL && *ptep & PTE_P) {
  1046d2:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  1046d6:	74 1b                	je     1046f3 <get_page+0x52>
  1046d8:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1046db:	8b 00                	mov    (%eax),%eax
  1046dd:	83 e0 01             	and    $0x1,%eax
  1046e0:	85 c0                	test   %eax,%eax
  1046e2:	74 0f                	je     1046f3 <get_page+0x52>
        return pte2page(*ptep);
  1046e4:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1046e7:	8b 00                	mov    (%eax),%eax
  1046e9:	89 04 24             	mov    %eax,(%esp)
  1046ec:	e8 bc f6 ff ff       	call   103dad <pte2page>
  1046f1:	eb 05                	jmp    1046f8 <get_page+0x57>
    }
    return NULL;
  1046f3:	b8 00 00 00 00       	mov    $0x0,%eax
}
  1046f8:	89 ec                	mov    %ebp,%esp
  1046fa:	5d                   	pop    %ebp
  1046fb:	c3                   	ret    

001046fc <page_remove_pte>:

//page_remove_pte - free an Page sturct which is related linear address la
//                - and clean(invalidate) pte which is related linear address la
//note: PT is changed, so the TLB need to be invalidate 
static inline void
page_remove_pte(pde_t *pgdir, uintptr_t la, pte_t *ptep) {
  1046fc:	55                   	push   %ebp
  1046fd:	89 e5                	mov    %esp,%ebp
                                  //(4) and free this page when page reference reachs 0
                                  //(5) clear second page table entry
                                  //(6) flush tlb
    }
#endif
}
  1046ff:	90                   	nop
  104700:	5d                   	pop    %ebp
  104701:	c3                   	ret    

00104702 <page_remove>:

//page_remove - free an Page which is related linear address la and has an validated pte
void
page_remove(pde_t *pgdir, uintptr_t la) {
  104702:	55                   	push   %ebp
  104703:	89 e5                	mov    %esp,%ebp
  104705:	83 ec 1c             	sub    $0x1c,%esp
    pte_t *ptep = get_pte(pgdir, la, 0);
  104708:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  10470f:	00 
  104710:	8b 45 0c             	mov    0xc(%ebp),%eax
  104713:	89 44 24 04          	mov    %eax,0x4(%esp)
  104717:	8b 45 08             	mov    0x8(%ebp),%eax
  10471a:	89 04 24             	mov    %eax,(%esp)
  10471d:	e8 79 ff ff ff       	call   10469b <get_pte>
  104722:	89 45 fc             	mov    %eax,-0x4(%ebp)
    if (ptep != NULL) {
  104725:	83 7d fc 00          	cmpl   $0x0,-0x4(%ebp)
  104729:	74 19                	je     104744 <page_remove+0x42>
        page_remove_pte(pgdir, la, ptep);
  10472b:	8b 45 fc             	mov    -0x4(%ebp),%eax
  10472e:	89 44 24 08          	mov    %eax,0x8(%esp)
  104732:	8b 45 0c             	mov    0xc(%ebp),%eax
  104735:	89 44 24 04          	mov    %eax,0x4(%esp)
  104739:	8b 45 08             	mov    0x8(%ebp),%eax
  10473c:	89 04 24             	mov    %eax,(%esp)
  10473f:	e8 b8 ff ff ff       	call   1046fc <page_remove_pte>
    }
}
  104744:	90                   	nop
  104745:	89 ec                	mov    %ebp,%esp
  104747:	5d                   	pop    %ebp
  104748:	c3                   	ret    

00104749 <page_insert>:
//  la:    the linear address need to map
//  perm:  the permission of this Page which is setted in related pte
// return value: always 0
//note: PT is changed, so the TLB need to be invalidate 
int
page_insert(pde_t *pgdir, struct Page *page, uintptr_t la, uint32_t perm) {
  104749:	55                   	push   %ebp
  10474a:	89 e5                	mov    %esp,%ebp
  10474c:	83 ec 28             	sub    $0x28,%esp
    pte_t *ptep = get_pte(pgdir, la, 1);
  10474f:	c7 44 24 08 01 00 00 	movl   $0x1,0x8(%esp)
  104756:	00 
  104757:	8b 45 10             	mov    0x10(%ebp),%eax
  10475a:	89 44 24 04          	mov    %eax,0x4(%esp)
  10475e:	8b 45 08             	mov    0x8(%ebp),%eax
  104761:	89 04 24             	mov    %eax,(%esp)
  104764:	e8 32 ff ff ff       	call   10469b <get_pte>
  104769:	89 45 f4             	mov    %eax,-0xc(%ebp)
    if (ptep == NULL) {
  10476c:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
  104770:	75 0a                	jne    10477c <page_insert+0x33>
        return -E_NO_MEM;
  104772:	b8 fc ff ff ff       	mov    $0xfffffffc,%eax
  104777:	e9 84 00 00 00       	jmp    104800 <page_insert+0xb7>
    }
    page_ref_inc(page);
  10477c:	8b 45 0c             	mov    0xc(%ebp),%eax
  10477f:	89 04 24             	mov    %eax,(%esp)
  104782:	e8 8a f6 ff ff       	call   103e11 <page_ref_inc>
    if (*ptep & PTE_P) {
  104787:	8b 45 f4             	mov    -0xc(%ebp),%eax
  10478a:	8b 00                	mov    (%eax),%eax
  10478c:	83 e0 01             	and    $0x1,%eax
  10478f:	85 c0                	test   %eax,%eax
  104791:	74 3e                	je     1047d1 <page_insert+0x88>
        struct Page *p = pte2page(*ptep);
  104793:	8b 45 f4             	mov    -0xc(%ebp),%eax
  104796:	8b 00                	mov    (%eax),%eax
  104798:	89 04 24             	mov    %eax,(%esp)
  10479b:	e8 0d f6 ff ff       	call   103dad <pte2page>
  1047a0:	89 45 f0             	mov    %eax,-0x10(%ebp)
        if (p == page) {
  1047a3:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1047a6:	3b 45 0c             	cmp    0xc(%ebp),%eax
  1047a9:	75 0d                	jne    1047b8 <page_insert+0x6f>
            page_ref_dec(page);
  1047ab:	8b 45 0c             	mov    0xc(%ebp),%eax
  1047ae:	89 04 24             	mov    %eax,(%esp)
  1047b1:	e8 72 f6 ff ff       	call   103e28 <page_ref_dec>
  1047b6:	eb 19                	jmp    1047d1 <page_insert+0x88>
        }
        else {
            page_remove_pte(pgdir, la, ptep);
  1047b8:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1047bb:	89 44 24 08          	mov    %eax,0x8(%esp)
  1047bf:	8b 45 10             	mov    0x10(%ebp),%eax
  1047c2:	89 44 24 04          	mov    %eax,0x4(%esp)
  1047c6:	8b 45 08             	mov    0x8(%ebp),%eax
  1047c9:	89 04 24             	mov    %eax,(%esp)
  1047cc:	e8 2b ff ff ff       	call   1046fc <page_remove_pte>
        }
    }
    *ptep = page2pa(page) | PTE_P | perm;
  1047d1:	8b 45 0c             	mov    0xc(%ebp),%eax
  1047d4:	89 04 24             	mov    %eax,(%esp)
  1047d7:	e8 12 f5 ff ff       	call   103cee <page2pa>
  1047dc:	0b 45 14             	or     0x14(%ebp),%eax
  1047df:	83 c8 01             	or     $0x1,%eax
  1047e2:	89 c2                	mov    %eax,%edx
  1047e4:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1047e7:	89 10                	mov    %edx,(%eax)
    tlb_invalidate(pgdir, la);
  1047e9:	8b 45 10             	mov    0x10(%ebp),%eax
  1047ec:	89 44 24 04          	mov    %eax,0x4(%esp)
  1047f0:	8b 45 08             	mov    0x8(%ebp),%eax
  1047f3:	89 04 24             	mov    %eax,(%esp)
  1047f6:	e8 09 00 00 00       	call   104804 <tlb_invalidate>
    return 0;
  1047fb:	b8 00 00 00 00       	mov    $0x0,%eax
}
  104800:	89 ec                	mov    %ebp,%esp
  104802:	5d                   	pop    %ebp
  104803:	c3                   	ret    

00104804 <tlb_invalidate>:

// invalidate a TLB entry, but only if the page tables being
// edited are the ones currently in use by the processor.
void
tlb_invalidate(pde_t *pgdir, uintptr_t la) {
  104804:	55                   	push   %ebp
  104805:	89 e5                	mov    %esp,%ebp
  104807:	83 ec 28             	sub    $0x28,%esp
}

static inline uintptr_t
rcr3(void) {
    uintptr_t cr3;
    asm volatile ("mov %%cr3, %0" : "=r" (cr3) :: "memory");
  10480a:	0f 20 d8             	mov    %cr3,%eax
  10480d:	89 45 f0             	mov    %eax,-0x10(%ebp)
    return cr3;
  104810:	8b 55 f0             	mov    -0x10(%ebp),%edx
    if (rcr3() == PADDR(pgdir)) {
  104813:	8b 45 08             	mov    0x8(%ebp),%eax
  104816:	89 45 f4             	mov    %eax,-0xc(%ebp)
  104819:	81 7d f4 ff ff ff bf 	cmpl   $0xbfffffff,-0xc(%ebp)
  104820:	77 23                	ja     104845 <tlb_invalidate+0x41>
  104822:	8b 45 f4             	mov    -0xc(%ebp),%eax
  104825:	89 44 24 0c          	mov    %eax,0xc(%esp)
  104829:	c7 44 24 08 e8 6b 10 	movl   $0x106be8,0x8(%esp)
  104830:	00 
  104831:	c7 44 24 04 c3 01 00 	movl   $0x1c3,0x4(%esp)
  104838:	00 
  104839:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104840:	e8 a9 c4 ff ff       	call   100cee <__panic>
  104845:	8b 45 f4             	mov    -0xc(%ebp),%eax
  104848:	05 00 00 00 40       	add    $0x40000000,%eax
  10484d:	39 d0                	cmp    %edx,%eax
  10484f:	75 0d                	jne    10485e <tlb_invalidate+0x5a>
        invlpg((void *)la);
  104851:	8b 45 0c             	mov    0xc(%ebp),%eax
  104854:	89 45 ec             	mov    %eax,-0x14(%ebp)
}

static inline void
invlpg(void *addr) {
    asm volatile ("invlpg (%0)" :: "r" (addr) : "memory");
  104857:	8b 45 ec             	mov    -0x14(%ebp),%eax
  10485a:	0f 01 38             	invlpg (%eax)
}
  10485d:	90                   	nop
    }
}
  10485e:	90                   	nop
  10485f:	89 ec                	mov    %ebp,%esp
  104861:	5d                   	pop    %ebp
  104862:	c3                   	ret    

00104863 <check_alloc_page>:

static void
check_alloc_page(void) {
  104863:	55                   	push   %ebp
  104864:	89 e5                	mov    %esp,%ebp
  104866:	83 ec 18             	sub    $0x18,%esp
    pmm_manager->check();
  104869:	a1 cc ce 11 00       	mov    0x11cecc,%eax
  10486e:	8b 40 18             	mov    0x18(%eax),%eax
  104871:	ff d0                	call   *%eax
    cprintf("check_alloc_page() succeeded!\n");
  104873:	c7 04 24 6c 6c 10 00 	movl   $0x106c6c,(%esp)
  10487a:	e8 e7 ba ff ff       	call   100366 <cprintf>
}
  10487f:	90                   	nop
  104880:	89 ec                	mov    %ebp,%esp
  104882:	5d                   	pop    %ebp
  104883:	c3                   	ret    

00104884 <check_pgdir>:

static void
check_pgdir(void) {
  104884:	55                   	push   %ebp
  104885:	89 e5                	mov    %esp,%ebp
  104887:	83 ec 38             	sub    $0x38,%esp
    assert(npage <= KMEMSIZE / PGSIZE);
  10488a:	a1 c4 ce 11 00       	mov    0x11cec4,%eax
  10488f:	3d 00 80 03 00       	cmp    $0x38000,%eax
  104894:	76 24                	jbe    1048ba <check_pgdir+0x36>
  104896:	c7 44 24 0c 8b 6c 10 	movl   $0x106c8b,0xc(%esp)
  10489d:	00 
  10489e:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  1048a5:	00 
  1048a6:	c7 44 24 04 d0 01 00 	movl   $0x1d0,0x4(%esp)
  1048ad:	00 
  1048ae:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  1048b5:	e8 34 c4 ff ff       	call   100cee <__panic>
    assert(boot_pgdir != NULL && (uint32_t)PGOFF(boot_pgdir) == 0);
  1048ba:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  1048bf:	85 c0                	test   %eax,%eax
  1048c1:	74 0e                	je     1048d1 <check_pgdir+0x4d>
  1048c3:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  1048c8:	25 ff 0f 00 00       	and    $0xfff,%eax
  1048cd:	85 c0                	test   %eax,%eax
  1048cf:	74 24                	je     1048f5 <check_pgdir+0x71>
  1048d1:	c7 44 24 0c a8 6c 10 	movl   $0x106ca8,0xc(%esp)
  1048d8:	00 
  1048d9:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  1048e0:	00 
  1048e1:	c7 44 24 04 d1 01 00 	movl   $0x1d1,0x4(%esp)
  1048e8:	00 
  1048e9:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  1048f0:	e8 f9 c3 ff ff       	call   100cee <__panic>
    assert(get_page(boot_pgdir, 0x0, NULL) == NULL);
  1048f5:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  1048fa:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  104901:	00 
  104902:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
  104909:	00 
  10490a:	89 04 24             	mov    %eax,(%esp)
  10490d:	e8 8f fd ff ff       	call   1046a1 <get_page>
  104912:	85 c0                	test   %eax,%eax
  104914:	74 24                	je     10493a <check_pgdir+0xb6>
  104916:	c7 44 24 0c e0 6c 10 	movl   $0x106ce0,0xc(%esp)
  10491d:	00 
  10491e:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104925:	00 
  104926:	c7 44 24 04 d2 01 00 	movl   $0x1d2,0x4(%esp)
  10492d:	00 
  10492e:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104935:	e8 b4 c3 ff ff       	call   100cee <__panic>

    struct Page *p1, *p2;
    p1 = alloc_page();
  10493a:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  104941:	e8 c3 f6 ff ff       	call   104009 <alloc_pages>
  104946:	89 45 f4             	mov    %eax,-0xc(%ebp)
    assert(page_insert(boot_pgdir, p1, 0x0, 0) == 0);
  104949:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  10494e:	c7 44 24 0c 00 00 00 	movl   $0x0,0xc(%esp)
  104955:	00 
  104956:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  10495d:	00 
  10495e:	8b 55 f4             	mov    -0xc(%ebp),%edx
  104961:	89 54 24 04          	mov    %edx,0x4(%esp)
  104965:	89 04 24             	mov    %eax,(%esp)
  104968:	e8 dc fd ff ff       	call   104749 <page_insert>
  10496d:	85 c0                	test   %eax,%eax
  10496f:	74 24                	je     104995 <check_pgdir+0x111>
  104971:	c7 44 24 0c 08 6d 10 	movl   $0x106d08,0xc(%esp)
  104978:	00 
  104979:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104980:	00 
  104981:	c7 44 24 04 d6 01 00 	movl   $0x1d6,0x4(%esp)
  104988:	00 
  104989:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104990:	e8 59 c3 ff ff       	call   100cee <__panic>

    pte_t *ptep;
    assert((ptep = get_pte(boot_pgdir, 0x0, 0)) != NULL);
  104995:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  10499a:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  1049a1:	00 
  1049a2:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
  1049a9:	00 
  1049aa:	89 04 24             	mov    %eax,(%esp)
  1049ad:	e8 e9 fc ff ff       	call   10469b <get_pte>
  1049b2:	89 45 f0             	mov    %eax,-0x10(%ebp)
  1049b5:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  1049b9:	75 24                	jne    1049df <check_pgdir+0x15b>
  1049bb:	c7 44 24 0c 34 6d 10 	movl   $0x106d34,0xc(%esp)
  1049c2:	00 
  1049c3:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  1049ca:	00 
  1049cb:	c7 44 24 04 d9 01 00 	movl   $0x1d9,0x4(%esp)
  1049d2:	00 
  1049d3:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  1049da:	e8 0f c3 ff ff       	call   100cee <__panic>
    assert(pte2page(*ptep) == p1);
  1049df:	8b 45 f0             	mov    -0x10(%ebp),%eax
  1049e2:	8b 00                	mov    (%eax),%eax
  1049e4:	89 04 24             	mov    %eax,(%esp)
  1049e7:	e8 c1 f3 ff ff       	call   103dad <pte2page>
  1049ec:	39 45 f4             	cmp    %eax,-0xc(%ebp)
  1049ef:	74 24                	je     104a15 <check_pgdir+0x191>
  1049f1:	c7 44 24 0c 61 6d 10 	movl   $0x106d61,0xc(%esp)
  1049f8:	00 
  1049f9:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104a00:	00 
  104a01:	c7 44 24 04 da 01 00 	movl   $0x1da,0x4(%esp)
  104a08:	00 
  104a09:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104a10:	e8 d9 c2 ff ff       	call   100cee <__panic>
    assert(page_ref(p1) == 1);
  104a15:	8b 45 f4             	mov    -0xc(%ebp),%eax
  104a18:	89 04 24             	mov    %eax,(%esp)
  104a1b:	e8 e7 f3 ff ff       	call   103e07 <page_ref>
  104a20:	83 f8 01             	cmp    $0x1,%eax
  104a23:	74 24                	je     104a49 <check_pgdir+0x1c5>
  104a25:	c7 44 24 0c 77 6d 10 	movl   $0x106d77,0xc(%esp)
  104a2c:	00 
  104a2d:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104a34:	00 
  104a35:	c7 44 24 04 db 01 00 	movl   $0x1db,0x4(%esp)
  104a3c:	00 
  104a3d:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104a44:	e8 a5 c2 ff ff       	call   100cee <__panic>

    ptep = &((pte_t *)KADDR(PDE_ADDR(boot_pgdir[0])))[1];
  104a49:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104a4e:	8b 00                	mov    (%eax),%eax
  104a50:	25 00 f0 ff ff       	and    $0xfffff000,%eax
  104a55:	89 45 ec             	mov    %eax,-0x14(%ebp)
  104a58:	8b 45 ec             	mov    -0x14(%ebp),%eax
  104a5b:	c1 e8 0c             	shr    $0xc,%eax
  104a5e:	89 45 e8             	mov    %eax,-0x18(%ebp)
  104a61:	a1 c4 ce 11 00       	mov    0x11cec4,%eax
  104a66:	39 45 e8             	cmp    %eax,-0x18(%ebp)
  104a69:	72 23                	jb     104a8e <check_pgdir+0x20a>
  104a6b:	8b 45 ec             	mov    -0x14(%ebp),%eax
  104a6e:	89 44 24 0c          	mov    %eax,0xc(%esp)
  104a72:	c7 44 24 08 44 6b 10 	movl   $0x106b44,0x8(%esp)
  104a79:	00 
  104a7a:	c7 44 24 04 dd 01 00 	movl   $0x1dd,0x4(%esp)
  104a81:	00 
  104a82:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104a89:	e8 60 c2 ff ff       	call   100cee <__panic>
  104a8e:	8b 45 ec             	mov    -0x14(%ebp),%eax
  104a91:	2d 00 00 00 40       	sub    $0x40000000,%eax
  104a96:	83 c0 04             	add    $0x4,%eax
  104a99:	89 45 f0             	mov    %eax,-0x10(%ebp)
    assert(get_pte(boot_pgdir, PGSIZE, 0) == ptep);
  104a9c:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104aa1:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  104aa8:	00 
  104aa9:	c7 44 24 04 00 10 00 	movl   $0x1000,0x4(%esp)
  104ab0:	00 
  104ab1:	89 04 24             	mov    %eax,(%esp)
  104ab4:	e8 e2 fb ff ff       	call   10469b <get_pte>
  104ab9:	39 45 f0             	cmp    %eax,-0x10(%ebp)
  104abc:	74 24                	je     104ae2 <check_pgdir+0x25e>
  104abe:	c7 44 24 0c 8c 6d 10 	movl   $0x106d8c,0xc(%esp)
  104ac5:	00 
  104ac6:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104acd:	00 
  104ace:	c7 44 24 04 de 01 00 	movl   $0x1de,0x4(%esp)
  104ad5:	00 
  104ad6:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104add:	e8 0c c2 ff ff       	call   100cee <__panic>

    p2 = alloc_page();
  104ae2:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  104ae9:	e8 1b f5 ff ff       	call   104009 <alloc_pages>
  104aee:	89 45 e4             	mov    %eax,-0x1c(%ebp)
    assert(page_insert(boot_pgdir, p2, PGSIZE, PTE_U | PTE_W) == 0);
  104af1:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104af6:	c7 44 24 0c 06 00 00 	movl   $0x6,0xc(%esp)
  104afd:	00 
  104afe:	c7 44 24 08 00 10 00 	movl   $0x1000,0x8(%esp)
  104b05:	00 
  104b06:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  104b09:	89 54 24 04          	mov    %edx,0x4(%esp)
  104b0d:	89 04 24             	mov    %eax,(%esp)
  104b10:	e8 34 fc ff ff       	call   104749 <page_insert>
  104b15:	85 c0                	test   %eax,%eax
  104b17:	74 24                	je     104b3d <check_pgdir+0x2b9>
  104b19:	c7 44 24 0c b4 6d 10 	movl   $0x106db4,0xc(%esp)
  104b20:	00 
  104b21:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104b28:	00 
  104b29:	c7 44 24 04 e1 01 00 	movl   $0x1e1,0x4(%esp)
  104b30:	00 
  104b31:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104b38:	e8 b1 c1 ff ff       	call   100cee <__panic>
    assert((ptep = get_pte(boot_pgdir, PGSIZE, 0)) != NULL);
  104b3d:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104b42:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  104b49:	00 
  104b4a:	c7 44 24 04 00 10 00 	movl   $0x1000,0x4(%esp)
  104b51:	00 
  104b52:	89 04 24             	mov    %eax,(%esp)
  104b55:	e8 41 fb ff ff       	call   10469b <get_pte>
  104b5a:	89 45 f0             	mov    %eax,-0x10(%ebp)
  104b5d:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  104b61:	75 24                	jne    104b87 <check_pgdir+0x303>
  104b63:	c7 44 24 0c ec 6d 10 	movl   $0x106dec,0xc(%esp)
  104b6a:	00 
  104b6b:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104b72:	00 
  104b73:	c7 44 24 04 e2 01 00 	movl   $0x1e2,0x4(%esp)
  104b7a:	00 
  104b7b:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104b82:	e8 67 c1 ff ff       	call   100cee <__panic>
    assert(*ptep & PTE_U);
  104b87:	8b 45 f0             	mov    -0x10(%ebp),%eax
  104b8a:	8b 00                	mov    (%eax),%eax
  104b8c:	83 e0 04             	and    $0x4,%eax
  104b8f:	85 c0                	test   %eax,%eax
  104b91:	75 24                	jne    104bb7 <check_pgdir+0x333>
  104b93:	c7 44 24 0c 1c 6e 10 	movl   $0x106e1c,0xc(%esp)
  104b9a:	00 
  104b9b:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104ba2:	00 
  104ba3:	c7 44 24 04 e3 01 00 	movl   $0x1e3,0x4(%esp)
  104baa:	00 
  104bab:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104bb2:	e8 37 c1 ff ff       	call   100cee <__panic>
    assert(*ptep & PTE_W);
  104bb7:	8b 45 f0             	mov    -0x10(%ebp),%eax
  104bba:	8b 00                	mov    (%eax),%eax
  104bbc:	83 e0 02             	and    $0x2,%eax
  104bbf:	85 c0                	test   %eax,%eax
  104bc1:	75 24                	jne    104be7 <check_pgdir+0x363>
  104bc3:	c7 44 24 0c 2a 6e 10 	movl   $0x106e2a,0xc(%esp)
  104bca:	00 
  104bcb:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104bd2:	00 
  104bd3:	c7 44 24 04 e4 01 00 	movl   $0x1e4,0x4(%esp)
  104bda:	00 
  104bdb:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104be2:	e8 07 c1 ff ff       	call   100cee <__panic>
    assert(boot_pgdir[0] & PTE_U);
  104be7:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104bec:	8b 00                	mov    (%eax),%eax
  104bee:	83 e0 04             	and    $0x4,%eax
  104bf1:	85 c0                	test   %eax,%eax
  104bf3:	75 24                	jne    104c19 <check_pgdir+0x395>
  104bf5:	c7 44 24 0c 38 6e 10 	movl   $0x106e38,0xc(%esp)
  104bfc:	00 
  104bfd:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104c04:	00 
  104c05:	c7 44 24 04 e5 01 00 	movl   $0x1e5,0x4(%esp)
  104c0c:	00 
  104c0d:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104c14:	e8 d5 c0 ff ff       	call   100cee <__panic>
    assert(page_ref(p2) == 1);
  104c19:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  104c1c:	89 04 24             	mov    %eax,(%esp)
  104c1f:	e8 e3 f1 ff ff       	call   103e07 <page_ref>
  104c24:	83 f8 01             	cmp    $0x1,%eax
  104c27:	74 24                	je     104c4d <check_pgdir+0x3c9>
  104c29:	c7 44 24 0c 4e 6e 10 	movl   $0x106e4e,0xc(%esp)
  104c30:	00 
  104c31:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104c38:	00 
  104c39:	c7 44 24 04 e6 01 00 	movl   $0x1e6,0x4(%esp)
  104c40:	00 
  104c41:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104c48:	e8 a1 c0 ff ff       	call   100cee <__panic>

    assert(page_insert(boot_pgdir, p1, PGSIZE, 0) == 0);
  104c4d:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104c52:	c7 44 24 0c 00 00 00 	movl   $0x0,0xc(%esp)
  104c59:	00 
  104c5a:	c7 44 24 08 00 10 00 	movl   $0x1000,0x8(%esp)
  104c61:	00 
  104c62:	8b 55 f4             	mov    -0xc(%ebp),%edx
  104c65:	89 54 24 04          	mov    %edx,0x4(%esp)
  104c69:	89 04 24             	mov    %eax,(%esp)
  104c6c:	e8 d8 fa ff ff       	call   104749 <page_insert>
  104c71:	85 c0                	test   %eax,%eax
  104c73:	74 24                	je     104c99 <check_pgdir+0x415>
  104c75:	c7 44 24 0c 60 6e 10 	movl   $0x106e60,0xc(%esp)
  104c7c:	00 
  104c7d:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104c84:	00 
  104c85:	c7 44 24 04 e8 01 00 	movl   $0x1e8,0x4(%esp)
  104c8c:	00 
  104c8d:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104c94:	e8 55 c0 ff ff       	call   100cee <__panic>
    assert(page_ref(p1) == 2);
  104c99:	8b 45 f4             	mov    -0xc(%ebp),%eax
  104c9c:	89 04 24             	mov    %eax,(%esp)
  104c9f:	e8 63 f1 ff ff       	call   103e07 <page_ref>
  104ca4:	83 f8 02             	cmp    $0x2,%eax
  104ca7:	74 24                	je     104ccd <check_pgdir+0x449>
  104ca9:	c7 44 24 0c 8c 6e 10 	movl   $0x106e8c,0xc(%esp)
  104cb0:	00 
  104cb1:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104cb8:	00 
  104cb9:	c7 44 24 04 e9 01 00 	movl   $0x1e9,0x4(%esp)
  104cc0:	00 
  104cc1:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104cc8:	e8 21 c0 ff ff       	call   100cee <__panic>
    assert(page_ref(p2) == 0);
  104ccd:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  104cd0:	89 04 24             	mov    %eax,(%esp)
  104cd3:	e8 2f f1 ff ff       	call   103e07 <page_ref>
  104cd8:	85 c0                	test   %eax,%eax
  104cda:	74 24                	je     104d00 <check_pgdir+0x47c>
  104cdc:	c7 44 24 0c 9e 6e 10 	movl   $0x106e9e,0xc(%esp)
  104ce3:	00 
  104ce4:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104ceb:	00 
  104cec:	c7 44 24 04 ea 01 00 	movl   $0x1ea,0x4(%esp)
  104cf3:	00 
  104cf4:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104cfb:	e8 ee bf ff ff       	call   100cee <__panic>
    assert((ptep = get_pte(boot_pgdir, PGSIZE, 0)) != NULL);
  104d00:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104d05:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  104d0c:	00 
  104d0d:	c7 44 24 04 00 10 00 	movl   $0x1000,0x4(%esp)
  104d14:	00 
  104d15:	89 04 24             	mov    %eax,(%esp)
  104d18:	e8 7e f9 ff ff       	call   10469b <get_pte>
  104d1d:	89 45 f0             	mov    %eax,-0x10(%ebp)
  104d20:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  104d24:	75 24                	jne    104d4a <check_pgdir+0x4c6>
  104d26:	c7 44 24 0c ec 6d 10 	movl   $0x106dec,0xc(%esp)
  104d2d:	00 
  104d2e:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104d35:	00 
  104d36:	c7 44 24 04 eb 01 00 	movl   $0x1eb,0x4(%esp)
  104d3d:	00 
  104d3e:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104d45:	e8 a4 bf ff ff       	call   100cee <__panic>
    assert(pte2page(*ptep) == p1);
  104d4a:	8b 45 f0             	mov    -0x10(%ebp),%eax
  104d4d:	8b 00                	mov    (%eax),%eax
  104d4f:	89 04 24             	mov    %eax,(%esp)
  104d52:	e8 56 f0 ff ff       	call   103dad <pte2page>
  104d57:	39 45 f4             	cmp    %eax,-0xc(%ebp)
  104d5a:	74 24                	je     104d80 <check_pgdir+0x4fc>
  104d5c:	c7 44 24 0c 61 6d 10 	movl   $0x106d61,0xc(%esp)
  104d63:	00 
  104d64:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104d6b:	00 
  104d6c:	c7 44 24 04 ec 01 00 	movl   $0x1ec,0x4(%esp)
  104d73:	00 
  104d74:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104d7b:	e8 6e bf ff ff       	call   100cee <__panic>
    assert((*ptep & PTE_U) == 0);
  104d80:	8b 45 f0             	mov    -0x10(%ebp),%eax
  104d83:	8b 00                	mov    (%eax),%eax
  104d85:	83 e0 04             	and    $0x4,%eax
  104d88:	85 c0                	test   %eax,%eax
  104d8a:	74 24                	je     104db0 <check_pgdir+0x52c>
  104d8c:	c7 44 24 0c b0 6e 10 	movl   $0x106eb0,0xc(%esp)
  104d93:	00 
  104d94:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104d9b:	00 
  104d9c:	c7 44 24 04 ed 01 00 	movl   $0x1ed,0x4(%esp)
  104da3:	00 
  104da4:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104dab:	e8 3e bf ff ff       	call   100cee <__panic>

    page_remove(boot_pgdir, 0x0);
  104db0:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104db5:	c7 44 24 04 00 00 00 	movl   $0x0,0x4(%esp)
  104dbc:	00 
  104dbd:	89 04 24             	mov    %eax,(%esp)
  104dc0:	e8 3d f9 ff ff       	call   104702 <page_remove>
    assert(page_ref(p1) == 1);
  104dc5:	8b 45 f4             	mov    -0xc(%ebp),%eax
  104dc8:	89 04 24             	mov    %eax,(%esp)
  104dcb:	e8 37 f0 ff ff       	call   103e07 <page_ref>
  104dd0:	83 f8 01             	cmp    $0x1,%eax
  104dd3:	74 24                	je     104df9 <check_pgdir+0x575>
  104dd5:	c7 44 24 0c 77 6d 10 	movl   $0x106d77,0xc(%esp)
  104ddc:	00 
  104ddd:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104de4:	00 
  104de5:	c7 44 24 04 f0 01 00 	movl   $0x1f0,0x4(%esp)
  104dec:	00 
  104ded:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104df4:	e8 f5 be ff ff       	call   100cee <__panic>
    assert(page_ref(p2) == 0);
  104df9:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  104dfc:	89 04 24             	mov    %eax,(%esp)
  104dff:	e8 03 f0 ff ff       	call   103e07 <page_ref>
  104e04:	85 c0                	test   %eax,%eax
  104e06:	74 24                	je     104e2c <check_pgdir+0x5a8>
  104e08:	c7 44 24 0c 9e 6e 10 	movl   $0x106e9e,0xc(%esp)
  104e0f:	00 
  104e10:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104e17:	00 
  104e18:	c7 44 24 04 f1 01 00 	movl   $0x1f1,0x4(%esp)
  104e1f:	00 
  104e20:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104e27:	e8 c2 be ff ff       	call   100cee <__panic>

    page_remove(boot_pgdir, PGSIZE);
  104e2c:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104e31:	c7 44 24 04 00 10 00 	movl   $0x1000,0x4(%esp)
  104e38:	00 
  104e39:	89 04 24             	mov    %eax,(%esp)
  104e3c:	e8 c1 f8 ff ff       	call   104702 <page_remove>
    assert(page_ref(p1) == 0);
  104e41:	8b 45 f4             	mov    -0xc(%ebp),%eax
  104e44:	89 04 24             	mov    %eax,(%esp)
  104e47:	e8 bb ef ff ff       	call   103e07 <page_ref>
  104e4c:	85 c0                	test   %eax,%eax
  104e4e:	74 24                	je     104e74 <check_pgdir+0x5f0>
  104e50:	c7 44 24 0c c5 6e 10 	movl   $0x106ec5,0xc(%esp)
  104e57:	00 
  104e58:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104e5f:	00 
  104e60:	c7 44 24 04 f4 01 00 	movl   $0x1f4,0x4(%esp)
  104e67:	00 
  104e68:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104e6f:	e8 7a be ff ff       	call   100cee <__panic>
    assert(page_ref(p2) == 0);
  104e74:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  104e77:	89 04 24             	mov    %eax,(%esp)
  104e7a:	e8 88 ef ff ff       	call   103e07 <page_ref>
  104e7f:	85 c0                	test   %eax,%eax
  104e81:	74 24                	je     104ea7 <check_pgdir+0x623>
  104e83:	c7 44 24 0c 9e 6e 10 	movl   $0x106e9e,0xc(%esp)
  104e8a:	00 
  104e8b:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104e92:	00 
  104e93:	c7 44 24 04 f5 01 00 	movl   $0x1f5,0x4(%esp)
  104e9a:	00 
  104e9b:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104ea2:	e8 47 be ff ff       	call   100cee <__panic>

    assert(page_ref(pde2page(boot_pgdir[0])) == 1);
  104ea7:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104eac:	8b 00                	mov    (%eax),%eax
  104eae:	89 04 24             	mov    %eax,(%esp)
  104eb1:	e8 37 ef ff ff       	call   103ded <pde2page>
  104eb6:	89 04 24             	mov    %eax,(%esp)
  104eb9:	e8 49 ef ff ff       	call   103e07 <page_ref>
  104ebe:	83 f8 01             	cmp    $0x1,%eax
  104ec1:	74 24                	je     104ee7 <check_pgdir+0x663>
  104ec3:	c7 44 24 0c d8 6e 10 	movl   $0x106ed8,0xc(%esp)
  104eca:	00 
  104ecb:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104ed2:	00 
  104ed3:	c7 44 24 04 f7 01 00 	movl   $0x1f7,0x4(%esp)
  104eda:	00 
  104edb:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104ee2:	e8 07 be ff ff       	call   100cee <__panic>
    free_page(pde2page(boot_pgdir[0]));
  104ee7:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104eec:	8b 00                	mov    (%eax),%eax
  104eee:	89 04 24             	mov    %eax,(%esp)
  104ef1:	e8 f7 ee ff ff       	call   103ded <pde2page>
  104ef6:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  104efd:	00 
  104efe:	89 04 24             	mov    %eax,(%esp)
  104f01:	e8 3d f1 ff ff       	call   104043 <free_pages>
    boot_pgdir[0] = 0;
  104f06:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104f0b:	c7 00 00 00 00 00    	movl   $0x0,(%eax)

    cprintf("check_pgdir() succeeded!\n");
  104f11:	c7 04 24 ff 6e 10 00 	movl   $0x106eff,(%esp)
  104f18:	e8 49 b4 ff ff       	call   100366 <cprintf>
}
  104f1d:	90                   	nop
  104f1e:	89 ec                	mov    %ebp,%esp
  104f20:	5d                   	pop    %ebp
  104f21:	c3                   	ret    

00104f22 <check_boot_pgdir>:

static void
check_boot_pgdir(void) {
  104f22:	55                   	push   %ebp
  104f23:	89 e5                	mov    %esp,%ebp
  104f25:	83 ec 38             	sub    $0x38,%esp
    pte_t *ptep;
    int i;
    for (i = 0; i < npage; i += PGSIZE) {
  104f28:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
  104f2f:	e9 ca 00 00 00       	jmp    104ffe <check_boot_pgdir+0xdc>
        assert((ptep = get_pte(boot_pgdir, (uintptr_t)KADDR(i), 0)) != NULL);
  104f34:	8b 45 f4             	mov    -0xc(%ebp),%eax
  104f37:	89 45 e4             	mov    %eax,-0x1c(%ebp)
  104f3a:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  104f3d:	c1 e8 0c             	shr    $0xc,%eax
  104f40:	89 45 e0             	mov    %eax,-0x20(%ebp)
  104f43:	a1 c4 ce 11 00       	mov    0x11cec4,%eax
  104f48:	39 45 e0             	cmp    %eax,-0x20(%ebp)
  104f4b:	72 23                	jb     104f70 <check_boot_pgdir+0x4e>
  104f4d:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  104f50:	89 44 24 0c          	mov    %eax,0xc(%esp)
  104f54:	c7 44 24 08 44 6b 10 	movl   $0x106b44,0x8(%esp)
  104f5b:	00 
  104f5c:	c7 44 24 04 03 02 00 	movl   $0x203,0x4(%esp)
  104f63:	00 
  104f64:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104f6b:	e8 7e bd ff ff       	call   100cee <__panic>
  104f70:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  104f73:	2d 00 00 00 40       	sub    $0x40000000,%eax
  104f78:	89 c2                	mov    %eax,%edx
  104f7a:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  104f7f:	c7 44 24 08 00 00 00 	movl   $0x0,0x8(%esp)
  104f86:	00 
  104f87:	89 54 24 04          	mov    %edx,0x4(%esp)
  104f8b:	89 04 24             	mov    %eax,(%esp)
  104f8e:	e8 08 f7 ff ff       	call   10469b <get_pte>
  104f93:	89 45 dc             	mov    %eax,-0x24(%ebp)
  104f96:	83 7d dc 00          	cmpl   $0x0,-0x24(%ebp)
  104f9a:	75 24                	jne    104fc0 <check_boot_pgdir+0x9e>
  104f9c:	c7 44 24 0c 1c 6f 10 	movl   $0x106f1c,0xc(%esp)
  104fa3:	00 
  104fa4:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104fab:	00 
  104fac:	c7 44 24 04 03 02 00 	movl   $0x203,0x4(%esp)
  104fb3:	00 
  104fb4:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104fbb:	e8 2e bd ff ff       	call   100cee <__panic>
        assert(PTE_ADDR(*ptep) == i);
  104fc0:	8b 45 dc             	mov    -0x24(%ebp),%eax
  104fc3:	8b 00                	mov    (%eax),%eax
  104fc5:	25 00 f0 ff ff       	and    $0xfffff000,%eax
  104fca:	89 c2                	mov    %eax,%edx
  104fcc:	8b 45 f4             	mov    -0xc(%ebp),%eax
  104fcf:	39 c2                	cmp    %eax,%edx
  104fd1:	74 24                	je     104ff7 <check_boot_pgdir+0xd5>
  104fd3:	c7 44 24 0c 59 6f 10 	movl   $0x106f59,0xc(%esp)
  104fda:	00 
  104fdb:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  104fe2:	00 
  104fe3:	c7 44 24 04 04 02 00 	movl   $0x204,0x4(%esp)
  104fea:	00 
  104feb:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  104ff2:	e8 f7 bc ff ff       	call   100cee <__panic>
    for (i = 0; i < npage; i += PGSIZE) {
  104ff7:	81 45 f4 00 10 00 00 	addl   $0x1000,-0xc(%ebp)
  104ffe:	8b 55 f4             	mov    -0xc(%ebp),%edx
  105001:	a1 c4 ce 11 00       	mov    0x11cec4,%eax
  105006:	39 c2                	cmp    %eax,%edx
  105008:	0f 82 26 ff ff ff    	jb     104f34 <check_boot_pgdir+0x12>
    }

    assert(PDE_ADDR(boot_pgdir[PDX(VPT)]) == PADDR(boot_pgdir));
  10500e:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  105013:	05 ac 0f 00 00       	add    $0xfac,%eax
  105018:	8b 00                	mov    (%eax),%eax
  10501a:	25 00 f0 ff ff       	and    $0xfffff000,%eax
  10501f:	89 c2                	mov    %eax,%edx
  105021:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  105026:	89 45 f0             	mov    %eax,-0x10(%ebp)
  105029:	81 7d f0 ff ff ff bf 	cmpl   $0xbfffffff,-0x10(%ebp)
  105030:	77 23                	ja     105055 <check_boot_pgdir+0x133>
  105032:	8b 45 f0             	mov    -0x10(%ebp),%eax
  105035:	89 44 24 0c          	mov    %eax,0xc(%esp)
  105039:	c7 44 24 08 e8 6b 10 	movl   $0x106be8,0x8(%esp)
  105040:	00 
  105041:	c7 44 24 04 07 02 00 	movl   $0x207,0x4(%esp)
  105048:	00 
  105049:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  105050:	e8 99 bc ff ff       	call   100cee <__panic>
  105055:	8b 45 f0             	mov    -0x10(%ebp),%eax
  105058:	05 00 00 00 40       	add    $0x40000000,%eax
  10505d:	39 d0                	cmp    %edx,%eax
  10505f:	74 24                	je     105085 <check_boot_pgdir+0x163>
  105061:	c7 44 24 0c 70 6f 10 	movl   $0x106f70,0xc(%esp)
  105068:	00 
  105069:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  105070:	00 
  105071:	c7 44 24 04 07 02 00 	movl   $0x207,0x4(%esp)
  105078:	00 
  105079:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  105080:	e8 69 bc ff ff       	call   100cee <__panic>

    assert(boot_pgdir[0] == 0);
  105085:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  10508a:	8b 00                	mov    (%eax),%eax
  10508c:	85 c0                	test   %eax,%eax
  10508e:	74 24                	je     1050b4 <check_boot_pgdir+0x192>
  105090:	c7 44 24 0c a4 6f 10 	movl   $0x106fa4,0xc(%esp)
  105097:	00 
  105098:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  10509f:	00 
  1050a0:	c7 44 24 04 09 02 00 	movl   $0x209,0x4(%esp)
  1050a7:	00 
  1050a8:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  1050af:	e8 3a bc ff ff       	call   100cee <__panic>

    struct Page *p;
    p = alloc_page();
  1050b4:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  1050bb:	e8 49 ef ff ff       	call   104009 <alloc_pages>
  1050c0:	89 45 ec             	mov    %eax,-0x14(%ebp)
    assert(page_insert(boot_pgdir, p, 0x100, PTE_W) == 0);
  1050c3:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  1050c8:	c7 44 24 0c 02 00 00 	movl   $0x2,0xc(%esp)
  1050cf:	00 
  1050d0:	c7 44 24 08 00 01 00 	movl   $0x100,0x8(%esp)
  1050d7:	00 
  1050d8:	8b 55 ec             	mov    -0x14(%ebp),%edx
  1050db:	89 54 24 04          	mov    %edx,0x4(%esp)
  1050df:	89 04 24             	mov    %eax,(%esp)
  1050e2:	e8 62 f6 ff ff       	call   104749 <page_insert>
  1050e7:	85 c0                	test   %eax,%eax
  1050e9:	74 24                	je     10510f <check_boot_pgdir+0x1ed>
  1050eb:	c7 44 24 0c b8 6f 10 	movl   $0x106fb8,0xc(%esp)
  1050f2:	00 
  1050f3:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  1050fa:	00 
  1050fb:	c7 44 24 04 0d 02 00 	movl   $0x20d,0x4(%esp)
  105102:	00 
  105103:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  10510a:	e8 df bb ff ff       	call   100cee <__panic>
    assert(page_ref(p) == 1);
  10510f:	8b 45 ec             	mov    -0x14(%ebp),%eax
  105112:	89 04 24             	mov    %eax,(%esp)
  105115:	e8 ed ec ff ff       	call   103e07 <page_ref>
  10511a:	83 f8 01             	cmp    $0x1,%eax
  10511d:	74 24                	je     105143 <check_boot_pgdir+0x221>
  10511f:	c7 44 24 0c e6 6f 10 	movl   $0x106fe6,0xc(%esp)
  105126:	00 
  105127:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  10512e:	00 
  10512f:	c7 44 24 04 0e 02 00 	movl   $0x20e,0x4(%esp)
  105136:	00 
  105137:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  10513e:	e8 ab bb ff ff       	call   100cee <__panic>
    assert(page_insert(boot_pgdir, p, 0x100 + PGSIZE, PTE_W) == 0);
  105143:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  105148:	c7 44 24 0c 02 00 00 	movl   $0x2,0xc(%esp)
  10514f:	00 
  105150:	c7 44 24 08 00 11 00 	movl   $0x1100,0x8(%esp)
  105157:	00 
  105158:	8b 55 ec             	mov    -0x14(%ebp),%edx
  10515b:	89 54 24 04          	mov    %edx,0x4(%esp)
  10515f:	89 04 24             	mov    %eax,(%esp)
  105162:	e8 e2 f5 ff ff       	call   104749 <page_insert>
  105167:	85 c0                	test   %eax,%eax
  105169:	74 24                	je     10518f <check_boot_pgdir+0x26d>
  10516b:	c7 44 24 0c f8 6f 10 	movl   $0x106ff8,0xc(%esp)
  105172:	00 
  105173:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  10517a:	00 
  10517b:	c7 44 24 04 0f 02 00 	movl   $0x20f,0x4(%esp)
  105182:	00 
  105183:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  10518a:	e8 5f bb ff ff       	call   100cee <__panic>
    assert(page_ref(p) == 2);
  10518f:	8b 45 ec             	mov    -0x14(%ebp),%eax
  105192:	89 04 24             	mov    %eax,(%esp)
  105195:	e8 6d ec ff ff       	call   103e07 <page_ref>
  10519a:	83 f8 02             	cmp    $0x2,%eax
  10519d:	74 24                	je     1051c3 <check_boot_pgdir+0x2a1>
  10519f:	c7 44 24 0c 2f 70 10 	movl   $0x10702f,0xc(%esp)
  1051a6:	00 
  1051a7:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  1051ae:	00 
  1051af:	c7 44 24 04 10 02 00 	movl   $0x210,0x4(%esp)
  1051b6:	00 
  1051b7:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  1051be:	e8 2b bb ff ff       	call   100cee <__panic>

    const char *str = "ucore: Hello world!!";
  1051c3:	c7 45 e8 40 70 10 00 	movl   $0x107040,-0x18(%ebp)
    strcpy((void *)0x100, str);
  1051ca:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1051cd:	89 44 24 04          	mov    %eax,0x4(%esp)
  1051d1:	c7 04 24 00 01 00 00 	movl   $0x100,(%esp)
  1051d8:	e8 fc 09 00 00       	call   105bd9 <strcpy>
    assert(strcmp((void *)0x100, (void *)(0x100 + PGSIZE)) == 0);
  1051dd:	c7 44 24 04 00 11 00 	movl   $0x1100,0x4(%esp)
  1051e4:	00 
  1051e5:	c7 04 24 00 01 00 00 	movl   $0x100,(%esp)
  1051ec:	e8 60 0a 00 00       	call   105c51 <strcmp>
  1051f1:	85 c0                	test   %eax,%eax
  1051f3:	74 24                	je     105219 <check_boot_pgdir+0x2f7>
  1051f5:	c7 44 24 0c 58 70 10 	movl   $0x107058,0xc(%esp)
  1051fc:	00 
  1051fd:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  105204:	00 
  105205:	c7 44 24 04 14 02 00 	movl   $0x214,0x4(%esp)
  10520c:	00 
  10520d:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  105214:	e8 d5 ba ff ff       	call   100cee <__panic>

    *(char *)(page2kva(p) + 0x100) = '\0';
  105219:	8b 45 ec             	mov    -0x14(%ebp),%eax
  10521c:	89 04 24             	mov    %eax,(%esp)
  10521f:	e8 33 eb ff ff       	call   103d57 <page2kva>
  105224:	05 00 01 00 00       	add    $0x100,%eax
  105229:	c6 00 00             	movb   $0x0,(%eax)
    assert(strlen((const char *)0x100) == 0);
  10522c:	c7 04 24 00 01 00 00 	movl   $0x100,(%esp)
  105233:	e8 47 09 00 00       	call   105b7f <strlen>
  105238:	85 c0                	test   %eax,%eax
  10523a:	74 24                	je     105260 <check_boot_pgdir+0x33e>
  10523c:	c7 44 24 0c 90 70 10 	movl   $0x107090,0xc(%esp)
  105243:	00 
  105244:	c7 44 24 08 31 6c 10 	movl   $0x106c31,0x8(%esp)
  10524b:	00 
  10524c:	c7 44 24 04 17 02 00 	movl   $0x217,0x4(%esp)
  105253:	00 
  105254:	c7 04 24 0c 6c 10 00 	movl   $0x106c0c,(%esp)
  10525b:	e8 8e ba ff ff       	call   100cee <__panic>

    free_page(p);
  105260:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  105267:	00 
  105268:	8b 45 ec             	mov    -0x14(%ebp),%eax
  10526b:	89 04 24             	mov    %eax,(%esp)
  10526e:	e8 d0 ed ff ff       	call   104043 <free_pages>
    free_page(pde2page(boot_pgdir[0]));
  105273:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  105278:	8b 00                	mov    (%eax),%eax
  10527a:	89 04 24             	mov    %eax,(%esp)
  10527d:	e8 6b eb ff ff       	call   103ded <pde2page>
  105282:	c7 44 24 04 01 00 00 	movl   $0x1,0x4(%esp)
  105289:	00 
  10528a:	89 04 24             	mov    %eax,(%esp)
  10528d:	e8 b1 ed ff ff       	call   104043 <free_pages>
    boot_pgdir[0] = 0;
  105292:	a1 e0 99 11 00       	mov    0x1199e0,%eax
  105297:	c7 00 00 00 00 00    	movl   $0x0,(%eax)

    cprintf("check_boot_pgdir() succeeded!\n");
  10529d:	c7 04 24 b4 70 10 00 	movl   $0x1070b4,(%esp)
  1052a4:	e8 bd b0 ff ff       	call   100366 <cprintf>
}
  1052a9:	90                   	nop
  1052aa:	89 ec                	mov    %ebp,%esp
  1052ac:	5d                   	pop    %ebp
  1052ad:	c3                   	ret    

001052ae <perm2str>:

//perm2str - use string 'u,r,w,-' to present the permission
static const char *
perm2str(int perm) {
  1052ae:	55                   	push   %ebp
  1052af:	89 e5                	mov    %esp,%ebp
    static char str[4];
    str[0] = (perm & PTE_U) ? 'u' : '-';
  1052b1:	8b 45 08             	mov    0x8(%ebp),%eax
  1052b4:	83 e0 04             	and    $0x4,%eax
  1052b7:	85 c0                	test   %eax,%eax
  1052b9:	74 04                	je     1052bf <perm2str+0x11>
  1052bb:	b0 75                	mov    $0x75,%al
  1052bd:	eb 02                	jmp    1052c1 <perm2str+0x13>
  1052bf:	b0 2d                	mov    $0x2d,%al
  1052c1:	a2 48 cf 11 00       	mov    %al,0x11cf48
    str[1] = 'r';
  1052c6:	c6 05 49 cf 11 00 72 	movb   $0x72,0x11cf49
    str[2] = (perm & PTE_W) ? 'w' : '-';
  1052cd:	8b 45 08             	mov    0x8(%ebp),%eax
  1052d0:	83 e0 02             	and    $0x2,%eax
  1052d3:	85 c0                	test   %eax,%eax
  1052d5:	74 04                	je     1052db <perm2str+0x2d>
  1052d7:	b0 77                	mov    $0x77,%al
  1052d9:	eb 02                	jmp    1052dd <perm2str+0x2f>
  1052db:	b0 2d                	mov    $0x2d,%al
  1052dd:	a2 4a cf 11 00       	mov    %al,0x11cf4a
    str[3] = '\0';
  1052e2:	c6 05 4b cf 11 00 00 	movb   $0x0,0x11cf4b
    return str;
  1052e9:	b8 48 cf 11 00       	mov    $0x11cf48,%eax
}
  1052ee:	5d                   	pop    %ebp
  1052ef:	c3                   	ret    

001052f0 <get_pgtable_items>:
//  table:       the beginning addr of table
//  left_store:  the pointer of the high side of table's next range
//  right_store: the pointer of the low side of table's next range
// return value: 0 - not a invalid item range, perm - a valid item range with perm permission 
static int
get_pgtable_items(size_t left, size_t right, size_t start, uintptr_t *table, size_t *left_store, size_t *right_store) {
  1052f0:	55                   	push   %ebp
  1052f1:	89 e5                	mov    %esp,%ebp
  1052f3:	83 ec 10             	sub    $0x10,%esp
    if (start >= right) {
  1052f6:	8b 45 10             	mov    0x10(%ebp),%eax
  1052f9:	3b 45 0c             	cmp    0xc(%ebp),%eax
  1052fc:	72 0d                	jb     10530b <get_pgtable_items+0x1b>
        return 0;
  1052fe:	b8 00 00 00 00       	mov    $0x0,%eax
  105303:	e9 98 00 00 00       	jmp    1053a0 <get_pgtable_items+0xb0>
    }
    while (start < right && !(table[start] & PTE_P)) {
        start ++;
  105308:	ff 45 10             	incl   0x10(%ebp)
    while (start < right && !(table[start] & PTE_P)) {
  10530b:	8b 45 10             	mov    0x10(%ebp),%eax
  10530e:	3b 45 0c             	cmp    0xc(%ebp),%eax
  105311:	73 18                	jae    10532b <get_pgtable_items+0x3b>
  105313:	8b 45 10             	mov    0x10(%ebp),%eax
  105316:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx
  10531d:	8b 45 14             	mov    0x14(%ebp),%eax
  105320:	01 d0                	add    %edx,%eax
  105322:	8b 00                	mov    (%eax),%eax
  105324:	83 e0 01             	and    $0x1,%eax
  105327:	85 c0                	test   %eax,%eax
  105329:	74 dd                	je     105308 <get_pgtable_items+0x18>
    }
    if (start < right) {
  10532b:	8b 45 10             	mov    0x10(%ebp),%eax
  10532e:	3b 45 0c             	cmp    0xc(%ebp),%eax
  105331:	73 68                	jae    10539b <get_pgtable_items+0xab>
        if (left_store != NULL) {
  105333:	83 7d 18 00          	cmpl   $0x0,0x18(%ebp)
  105337:	74 08                	je     105341 <get_pgtable_items+0x51>
            *left_store = start;
  105339:	8b 45 18             	mov    0x18(%ebp),%eax
  10533c:	8b 55 10             	mov    0x10(%ebp),%edx
  10533f:	89 10                	mov    %edx,(%eax)
        }
        int perm = (table[start ++] & PTE_USER);
  105341:	8b 45 10             	mov    0x10(%ebp),%eax
  105344:	8d 50 01             	lea    0x1(%eax),%edx
  105347:	89 55 10             	mov    %edx,0x10(%ebp)
  10534a:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx
  105351:	8b 45 14             	mov    0x14(%ebp),%eax
  105354:	01 d0                	add    %edx,%eax
  105356:	8b 00                	mov    (%eax),%eax
  105358:	83 e0 07             	and    $0x7,%eax
  10535b:	89 45 fc             	mov    %eax,-0x4(%ebp)
        while (start < right && (table[start] & PTE_USER) == perm) {
  10535e:	eb 03                	jmp    105363 <get_pgtable_items+0x73>
            start ++;
  105360:	ff 45 10             	incl   0x10(%ebp)
        while (start < right && (table[start] & PTE_USER) == perm) {
  105363:	8b 45 10             	mov    0x10(%ebp),%eax
  105366:	3b 45 0c             	cmp    0xc(%ebp),%eax
  105369:	73 1d                	jae    105388 <get_pgtable_items+0x98>
  10536b:	8b 45 10             	mov    0x10(%ebp),%eax
  10536e:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx
  105375:	8b 45 14             	mov    0x14(%ebp),%eax
  105378:	01 d0                	add    %edx,%eax
  10537a:	8b 00                	mov    (%eax),%eax
  10537c:	83 e0 07             	and    $0x7,%eax
  10537f:	89 c2                	mov    %eax,%edx
  105381:	8b 45 fc             	mov    -0x4(%ebp),%eax
  105384:	39 c2                	cmp    %eax,%edx
  105386:	74 d8                	je     105360 <get_pgtable_items+0x70>
        }
        if (right_store != NULL) {
  105388:	83 7d 1c 00          	cmpl   $0x0,0x1c(%ebp)
  10538c:	74 08                	je     105396 <get_pgtable_items+0xa6>
            *right_store = start;
  10538e:	8b 45 1c             	mov    0x1c(%ebp),%eax
  105391:	8b 55 10             	mov    0x10(%ebp),%edx
  105394:	89 10                	mov    %edx,(%eax)
        }
        return perm;
  105396:	8b 45 fc             	mov    -0x4(%ebp),%eax
  105399:	eb 05                	jmp    1053a0 <get_pgtable_items+0xb0>
    }
    return 0;
  10539b:	b8 00 00 00 00       	mov    $0x0,%eax
}
  1053a0:	89 ec                	mov    %ebp,%esp
  1053a2:	5d                   	pop    %ebp
  1053a3:	c3                   	ret    

001053a4 <print_pgdir>:

//print_pgdir - print the PDT&PT
void
print_pgdir(void) {
  1053a4:	55                   	push   %ebp
  1053a5:	89 e5                	mov    %esp,%ebp
  1053a7:	57                   	push   %edi
  1053a8:	56                   	push   %esi
  1053a9:	53                   	push   %ebx
  1053aa:	83 ec 4c             	sub    $0x4c,%esp
    cprintf("-------------------- BEGIN --------------------\n");
  1053ad:	c7 04 24 d4 70 10 00 	movl   $0x1070d4,(%esp)
  1053b4:	e8 ad af ff ff       	call   100366 <cprintf>
    size_t left, right = 0, perm;
  1053b9:	c7 45 dc 00 00 00 00 	movl   $0x0,-0x24(%ebp)
    while ((perm = get_pgtable_items(0, NPDEENTRY, right, vpd, &left, &right)) != 0) {
  1053c0:	e9 f2 00 00 00       	jmp    1054b7 <print_pgdir+0x113>
        cprintf("PDE(%03x) %08x-%08x %08x %s\n", right - left,
  1053c5:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1053c8:	89 04 24             	mov    %eax,(%esp)
  1053cb:	e8 de fe ff ff       	call   1052ae <perm2str>
                left * PTSIZE, right * PTSIZE, (right - left) * PTSIZE, perm2str(perm));
  1053d0:	8b 55 dc             	mov    -0x24(%ebp),%edx
  1053d3:	8b 4d e0             	mov    -0x20(%ebp),%ecx
  1053d6:	29 ca                	sub    %ecx,%edx
        cprintf("PDE(%03x) %08x-%08x %08x %s\n", right - left,
  1053d8:	89 d6                	mov    %edx,%esi
  1053da:	c1 e6 16             	shl    $0x16,%esi
  1053dd:	8b 55 dc             	mov    -0x24(%ebp),%edx
  1053e0:	89 d3                	mov    %edx,%ebx
  1053e2:	c1 e3 16             	shl    $0x16,%ebx
  1053e5:	8b 55 e0             	mov    -0x20(%ebp),%edx
  1053e8:	89 d1                	mov    %edx,%ecx
  1053ea:	c1 e1 16             	shl    $0x16,%ecx
  1053ed:	8b 55 dc             	mov    -0x24(%ebp),%edx
  1053f0:	8b 7d e0             	mov    -0x20(%ebp),%edi
  1053f3:	29 fa                	sub    %edi,%edx
  1053f5:	89 44 24 14          	mov    %eax,0x14(%esp)
  1053f9:	89 74 24 10          	mov    %esi,0x10(%esp)
  1053fd:	89 5c 24 0c          	mov    %ebx,0xc(%esp)
  105401:	89 4c 24 08          	mov    %ecx,0x8(%esp)
  105405:	89 54 24 04          	mov    %edx,0x4(%esp)
  105409:	c7 04 24 05 71 10 00 	movl   $0x107105,(%esp)
  105410:	e8 51 af ff ff       	call   100366 <cprintf>
        size_t l, r = left * NPTEENTRY;
  105415:	8b 45 e0             	mov    -0x20(%ebp),%eax
  105418:	c1 e0 0a             	shl    $0xa,%eax
  10541b:	89 45 d4             	mov    %eax,-0x2c(%ebp)
        while ((perm = get_pgtable_items(left * NPTEENTRY, right * NPTEENTRY, r, vpt, &l, &r)) != 0) {
  10541e:	eb 50                	jmp    105470 <print_pgdir+0xcc>
            cprintf("  |-- PTE(%05x) %08x-%08x %08x %s\n", r - l,
  105420:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  105423:	89 04 24             	mov    %eax,(%esp)
  105426:	e8 83 fe ff ff       	call   1052ae <perm2str>
                    l * PGSIZE, r * PGSIZE, (r - l) * PGSIZE, perm2str(perm));
  10542b:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  10542e:	8b 4d d8             	mov    -0x28(%ebp),%ecx
  105431:	29 ca                	sub    %ecx,%edx
            cprintf("  |-- PTE(%05x) %08x-%08x %08x %s\n", r - l,
  105433:	89 d6                	mov    %edx,%esi
  105435:	c1 e6 0c             	shl    $0xc,%esi
  105438:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  10543b:	89 d3                	mov    %edx,%ebx
  10543d:	c1 e3 0c             	shl    $0xc,%ebx
  105440:	8b 55 d8             	mov    -0x28(%ebp),%edx
  105443:	89 d1                	mov    %edx,%ecx
  105445:	c1 e1 0c             	shl    $0xc,%ecx
  105448:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  10544b:	8b 7d d8             	mov    -0x28(%ebp),%edi
  10544e:	29 fa                	sub    %edi,%edx
  105450:	89 44 24 14          	mov    %eax,0x14(%esp)
  105454:	89 74 24 10          	mov    %esi,0x10(%esp)
  105458:	89 5c 24 0c          	mov    %ebx,0xc(%esp)
  10545c:	89 4c 24 08          	mov    %ecx,0x8(%esp)
  105460:	89 54 24 04          	mov    %edx,0x4(%esp)
  105464:	c7 04 24 24 71 10 00 	movl   $0x107124,(%esp)
  10546b:	e8 f6 ae ff ff       	call   100366 <cprintf>
        while ((perm = get_pgtable_items(left * NPTEENTRY, right * NPTEENTRY, r, vpt, &l, &r)) != 0) {
  105470:	be 00 00 c0 fa       	mov    $0xfac00000,%esi
  105475:	8b 45 d4             	mov    -0x2c(%ebp),%eax
  105478:	8b 55 dc             	mov    -0x24(%ebp),%edx
  10547b:	89 d3                	mov    %edx,%ebx
  10547d:	c1 e3 0a             	shl    $0xa,%ebx
  105480:	8b 55 e0             	mov    -0x20(%ebp),%edx
  105483:	89 d1                	mov    %edx,%ecx
  105485:	c1 e1 0a             	shl    $0xa,%ecx
  105488:	8d 55 d4             	lea    -0x2c(%ebp),%edx
  10548b:	89 54 24 14          	mov    %edx,0x14(%esp)
  10548f:	8d 55 d8             	lea    -0x28(%ebp),%edx
  105492:	89 54 24 10          	mov    %edx,0x10(%esp)
  105496:	89 74 24 0c          	mov    %esi,0xc(%esp)
  10549a:	89 44 24 08          	mov    %eax,0x8(%esp)
  10549e:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  1054a2:	89 0c 24             	mov    %ecx,(%esp)
  1054a5:	e8 46 fe ff ff       	call   1052f0 <get_pgtable_items>
  1054aa:	89 45 e4             	mov    %eax,-0x1c(%ebp)
  1054ad:	83 7d e4 00          	cmpl   $0x0,-0x1c(%ebp)
  1054b1:	0f 85 69 ff ff ff    	jne    105420 <print_pgdir+0x7c>
    while ((perm = get_pgtable_items(0, NPDEENTRY, right, vpd, &left, &right)) != 0) {
  1054b7:	b9 00 b0 fe fa       	mov    $0xfafeb000,%ecx
  1054bc:	8b 45 dc             	mov    -0x24(%ebp),%eax
  1054bf:	8d 55 dc             	lea    -0x24(%ebp),%edx
  1054c2:	89 54 24 14          	mov    %edx,0x14(%esp)
  1054c6:	8d 55 e0             	lea    -0x20(%ebp),%edx
  1054c9:	89 54 24 10          	mov    %edx,0x10(%esp)
  1054cd:	89 4c 24 0c          	mov    %ecx,0xc(%esp)
  1054d1:	89 44 24 08          	mov    %eax,0x8(%esp)
  1054d5:	c7 44 24 04 00 04 00 	movl   $0x400,0x4(%esp)
  1054dc:	00 
  1054dd:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  1054e4:	e8 07 fe ff ff       	call   1052f0 <get_pgtable_items>
  1054e9:	89 45 e4             	mov    %eax,-0x1c(%ebp)
  1054ec:	83 7d e4 00          	cmpl   $0x0,-0x1c(%ebp)
  1054f0:	0f 85 cf fe ff ff    	jne    1053c5 <print_pgdir+0x21>
        }
    }
    cprintf("--------------------- END ---------------------\n");
  1054f6:	c7 04 24 48 71 10 00 	movl   $0x107148,(%esp)
  1054fd:	e8 64 ae ff ff       	call   100366 <cprintf>
}
  105502:	90                   	nop
  105503:	83 c4 4c             	add    $0x4c,%esp
  105506:	5b                   	pop    %ebx
  105507:	5e                   	pop    %esi
  105508:	5f                   	pop    %edi
  105509:	5d                   	pop    %ebp
  10550a:	c3                   	ret    

0010550b <printnum>:
 * @width:      maximum number of digits, if the actual width is less than @width, use @padc instead
 * @padc:       character that padded on the left if the actual width is less than @width
 * */
static void
printnum(void (*putch)(int, void*), void *putdat,
        unsigned long long num, unsigned base, int width, int padc) {
  10550b:	55                   	push   %ebp
  10550c:	89 e5                	mov    %esp,%ebp
  10550e:	83 ec 58             	sub    $0x58,%esp
  105511:	8b 45 10             	mov    0x10(%ebp),%eax
  105514:	89 45 d0             	mov    %eax,-0x30(%ebp)
  105517:	8b 45 14             	mov    0x14(%ebp),%eax
  10551a:	89 45 d4             	mov    %eax,-0x2c(%ebp)
    unsigned long long result = num;
  10551d:	8b 45 d0             	mov    -0x30(%ebp),%eax
  105520:	8b 55 d4             	mov    -0x2c(%ebp),%edx
  105523:	89 45 e8             	mov    %eax,-0x18(%ebp)
  105526:	89 55 ec             	mov    %edx,-0x14(%ebp)
    unsigned mod = do_div(result, base);
  105529:	8b 45 18             	mov    0x18(%ebp),%eax
  10552c:	89 45 e4             	mov    %eax,-0x1c(%ebp)
  10552f:	8b 45 e8             	mov    -0x18(%ebp),%eax
  105532:	8b 55 ec             	mov    -0x14(%ebp),%edx
  105535:	89 45 e0             	mov    %eax,-0x20(%ebp)
  105538:	89 55 f0             	mov    %edx,-0x10(%ebp)
  10553b:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10553e:	89 45 f4             	mov    %eax,-0xc(%ebp)
  105541:	83 7d f0 00          	cmpl   $0x0,-0x10(%ebp)
  105545:	74 1c                	je     105563 <printnum+0x58>
  105547:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10554a:	ba 00 00 00 00       	mov    $0x0,%edx
  10554f:	f7 75 e4             	divl   -0x1c(%ebp)
  105552:	89 55 f4             	mov    %edx,-0xc(%ebp)
  105555:	8b 45 f0             	mov    -0x10(%ebp),%eax
  105558:	ba 00 00 00 00       	mov    $0x0,%edx
  10555d:	f7 75 e4             	divl   -0x1c(%ebp)
  105560:	89 45 f0             	mov    %eax,-0x10(%ebp)
  105563:	8b 45 e0             	mov    -0x20(%ebp),%eax
  105566:	8b 55 f4             	mov    -0xc(%ebp),%edx
  105569:	f7 75 e4             	divl   -0x1c(%ebp)
  10556c:	89 45 e0             	mov    %eax,-0x20(%ebp)
  10556f:	89 55 dc             	mov    %edx,-0x24(%ebp)
  105572:	8b 45 e0             	mov    -0x20(%ebp),%eax
  105575:	8b 55 f0             	mov    -0x10(%ebp),%edx
  105578:	89 45 e8             	mov    %eax,-0x18(%ebp)
  10557b:	89 55 ec             	mov    %edx,-0x14(%ebp)
  10557e:	8b 45 dc             	mov    -0x24(%ebp),%eax
  105581:	89 45 d8             	mov    %eax,-0x28(%ebp)

    // first recursively print all preceding (more significant) digits
    if (num >= base) {
  105584:	8b 45 18             	mov    0x18(%ebp),%eax
  105587:	ba 00 00 00 00       	mov    $0x0,%edx
  10558c:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
  10558f:	39 45 d0             	cmp    %eax,-0x30(%ebp)
  105592:	19 d1                	sbb    %edx,%ecx
  105594:	72 4c                	jb     1055e2 <printnum+0xd7>
        printnum(putch, putdat, result, base, width - 1, padc);
  105596:	8b 45 1c             	mov    0x1c(%ebp),%eax
  105599:	8d 50 ff             	lea    -0x1(%eax),%edx
  10559c:	8b 45 20             	mov    0x20(%ebp),%eax
  10559f:	89 44 24 18          	mov    %eax,0x18(%esp)
  1055a3:	89 54 24 14          	mov    %edx,0x14(%esp)
  1055a7:	8b 45 18             	mov    0x18(%ebp),%eax
  1055aa:	89 44 24 10          	mov    %eax,0x10(%esp)
  1055ae:	8b 45 e8             	mov    -0x18(%ebp),%eax
  1055b1:	8b 55 ec             	mov    -0x14(%ebp),%edx
  1055b4:	89 44 24 08          	mov    %eax,0x8(%esp)
  1055b8:	89 54 24 0c          	mov    %edx,0xc(%esp)
  1055bc:	8b 45 0c             	mov    0xc(%ebp),%eax
  1055bf:	89 44 24 04          	mov    %eax,0x4(%esp)
  1055c3:	8b 45 08             	mov    0x8(%ebp),%eax
  1055c6:	89 04 24             	mov    %eax,(%esp)
  1055c9:	e8 3d ff ff ff       	call   10550b <printnum>
  1055ce:	eb 1b                	jmp    1055eb <printnum+0xe0>
    } else {
        // print any needed pad characters before first digit
        while (-- width > 0)
            putch(padc, putdat);
  1055d0:	8b 45 0c             	mov    0xc(%ebp),%eax
  1055d3:	89 44 24 04          	mov    %eax,0x4(%esp)
  1055d7:	8b 45 20             	mov    0x20(%ebp),%eax
  1055da:	89 04 24             	mov    %eax,(%esp)
  1055dd:	8b 45 08             	mov    0x8(%ebp),%eax
  1055e0:	ff d0                	call   *%eax
        while (-- width > 0)
  1055e2:	ff 4d 1c             	decl   0x1c(%ebp)
  1055e5:	83 7d 1c 00          	cmpl   $0x0,0x1c(%ebp)
  1055e9:	7f e5                	jg     1055d0 <printnum+0xc5>
    }
    // then print this (the least significant) digit
    putch("0123456789abcdef"[mod], putdat);
  1055eb:	8b 45 d8             	mov    -0x28(%ebp),%eax
  1055ee:	05 fc 71 10 00       	add    $0x1071fc,%eax
  1055f3:	0f b6 00             	movzbl (%eax),%eax
  1055f6:	0f be c0             	movsbl %al,%eax
  1055f9:	8b 55 0c             	mov    0xc(%ebp),%edx
  1055fc:	89 54 24 04          	mov    %edx,0x4(%esp)
  105600:	89 04 24             	mov    %eax,(%esp)
  105603:	8b 45 08             	mov    0x8(%ebp),%eax
  105606:	ff d0                	call   *%eax
}
  105608:	90                   	nop
  105609:	89 ec                	mov    %ebp,%esp
  10560b:	5d                   	pop    %ebp
  10560c:	c3                   	ret    

0010560d <getuint>:
 * getuint - get an unsigned int of various possible sizes from a varargs list
 * @ap:         a varargs list pointer
 * @lflag:      determines the size of the vararg that @ap points to
 * */
static unsigned long long
getuint(va_list *ap, int lflag) {
  10560d:	55                   	push   %ebp
  10560e:	89 e5                	mov    %esp,%ebp
    if (lflag >= 2) {
  105610:	83 7d 0c 01          	cmpl   $0x1,0xc(%ebp)
  105614:	7e 14                	jle    10562a <getuint+0x1d>
        return va_arg(*ap, unsigned long long);
  105616:	8b 45 08             	mov    0x8(%ebp),%eax
  105619:	8b 00                	mov    (%eax),%eax
  10561b:	8d 48 08             	lea    0x8(%eax),%ecx
  10561e:	8b 55 08             	mov    0x8(%ebp),%edx
  105621:	89 0a                	mov    %ecx,(%edx)
  105623:	8b 50 04             	mov    0x4(%eax),%edx
  105626:	8b 00                	mov    (%eax),%eax
  105628:	eb 30                	jmp    10565a <getuint+0x4d>
    }
    else if (lflag) {
  10562a:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
  10562e:	74 16                	je     105646 <getuint+0x39>
        return va_arg(*ap, unsigned long);
  105630:	8b 45 08             	mov    0x8(%ebp),%eax
  105633:	8b 00                	mov    (%eax),%eax
  105635:	8d 48 04             	lea    0x4(%eax),%ecx
  105638:	8b 55 08             	mov    0x8(%ebp),%edx
  10563b:	89 0a                	mov    %ecx,(%edx)
  10563d:	8b 00                	mov    (%eax),%eax
  10563f:	ba 00 00 00 00       	mov    $0x0,%edx
  105644:	eb 14                	jmp    10565a <getuint+0x4d>
    }
    else {
        return va_arg(*ap, unsigned int);
  105646:	8b 45 08             	mov    0x8(%ebp),%eax
  105649:	8b 00                	mov    (%eax),%eax
  10564b:	8d 48 04             	lea    0x4(%eax),%ecx
  10564e:	8b 55 08             	mov    0x8(%ebp),%edx
  105651:	89 0a                	mov    %ecx,(%edx)
  105653:	8b 00                	mov    (%eax),%eax
  105655:	ba 00 00 00 00       	mov    $0x0,%edx
    }
}
  10565a:	5d                   	pop    %ebp
  10565b:	c3                   	ret    

0010565c <getint>:
 * getint - same as getuint but signed, we can't use getuint because of sign extension
 * @ap:         a varargs list pointer
 * @lflag:      determines the size of the vararg that @ap points to
 * */
static long long
getint(va_list *ap, int lflag) {
  10565c:	55                   	push   %ebp
  10565d:	89 e5                	mov    %esp,%ebp
    if (lflag >= 2) {
  10565f:	83 7d 0c 01          	cmpl   $0x1,0xc(%ebp)
  105663:	7e 14                	jle    105679 <getint+0x1d>
        return va_arg(*ap, long long);
  105665:	8b 45 08             	mov    0x8(%ebp),%eax
  105668:	8b 00                	mov    (%eax),%eax
  10566a:	8d 48 08             	lea    0x8(%eax),%ecx
  10566d:	8b 55 08             	mov    0x8(%ebp),%edx
  105670:	89 0a                	mov    %ecx,(%edx)
  105672:	8b 50 04             	mov    0x4(%eax),%edx
  105675:	8b 00                	mov    (%eax),%eax
  105677:	eb 28                	jmp    1056a1 <getint+0x45>
    }
    else if (lflag) {
  105679:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
  10567d:	74 12                	je     105691 <getint+0x35>
        return va_arg(*ap, long);
  10567f:	8b 45 08             	mov    0x8(%ebp),%eax
  105682:	8b 00                	mov    (%eax),%eax
  105684:	8d 48 04             	lea    0x4(%eax),%ecx
  105687:	8b 55 08             	mov    0x8(%ebp),%edx
  10568a:	89 0a                	mov    %ecx,(%edx)
  10568c:	8b 00                	mov    (%eax),%eax
  10568e:	99                   	cltd   
  10568f:	eb 10                	jmp    1056a1 <getint+0x45>
    }
    else {
        return va_arg(*ap, int);
  105691:	8b 45 08             	mov    0x8(%ebp),%eax
  105694:	8b 00                	mov    (%eax),%eax
  105696:	8d 48 04             	lea    0x4(%eax),%ecx
  105699:	8b 55 08             	mov    0x8(%ebp),%edx
  10569c:	89 0a                	mov    %ecx,(%edx)
  10569e:	8b 00                	mov    (%eax),%eax
  1056a0:	99                   	cltd   
    }
}
  1056a1:	5d                   	pop    %ebp
  1056a2:	c3                   	ret    

001056a3 <printfmt>:
 * @putch:      specified putch function, print a single character
 * @putdat:     used by @putch function
 * @fmt:        the format string to use
 * */
void
printfmt(void (*putch)(int, void*), void *putdat, const char *fmt, ...) {
  1056a3:	55                   	push   %ebp
  1056a4:	89 e5                	mov    %esp,%ebp
  1056a6:	83 ec 28             	sub    $0x28,%esp
    va_list ap;

    va_start(ap, fmt);
  1056a9:	8d 45 14             	lea    0x14(%ebp),%eax
  1056ac:	89 45 f4             	mov    %eax,-0xc(%ebp)
    vprintfmt(putch, putdat, fmt, ap);
  1056af:	8b 45 f4             	mov    -0xc(%ebp),%eax
  1056b2:	89 44 24 0c          	mov    %eax,0xc(%esp)
  1056b6:	8b 45 10             	mov    0x10(%ebp),%eax
  1056b9:	89 44 24 08          	mov    %eax,0x8(%esp)
  1056bd:	8b 45 0c             	mov    0xc(%ebp),%eax
  1056c0:	89 44 24 04          	mov    %eax,0x4(%esp)
  1056c4:	8b 45 08             	mov    0x8(%ebp),%eax
  1056c7:	89 04 24             	mov    %eax,(%esp)
  1056ca:	e8 05 00 00 00       	call   1056d4 <vprintfmt>
    va_end(ap);
}
  1056cf:	90                   	nop
  1056d0:	89 ec                	mov    %ebp,%esp
  1056d2:	5d                   	pop    %ebp
  1056d3:	c3                   	ret    

001056d4 <vprintfmt>:
 *
 * Call this function if you are already dealing with a va_list.
 * Or you probably want printfmt() instead.
 * */
void
vprintfmt(void (*putch)(int, void*), void *putdat, const char *fmt, va_list ap) {
  1056d4:	55                   	push   %ebp
  1056d5:	89 e5                	mov    %esp,%ebp
  1056d7:	56                   	push   %esi
  1056d8:	53                   	push   %ebx
  1056d9:	83 ec 40             	sub    $0x40,%esp
    register int ch, err;
    unsigned long long num;
    int base, width, precision, lflag, altflag;

    while (1) {
        while ((ch = *(unsigned char *)fmt ++) != '%') {
  1056dc:	eb 17                	jmp    1056f5 <vprintfmt+0x21>
            if (ch == '\0') {
  1056de:	85 db                	test   %ebx,%ebx
  1056e0:	0f 84 bf 03 00 00    	je     105aa5 <vprintfmt+0x3d1>
                return;
            }
            putch(ch, putdat);
  1056e6:	8b 45 0c             	mov    0xc(%ebp),%eax
  1056e9:	89 44 24 04          	mov    %eax,0x4(%esp)
  1056ed:	89 1c 24             	mov    %ebx,(%esp)
  1056f0:	8b 45 08             	mov    0x8(%ebp),%eax
  1056f3:	ff d0                	call   *%eax
        while ((ch = *(unsigned char *)fmt ++) != '%') {
  1056f5:	8b 45 10             	mov    0x10(%ebp),%eax
  1056f8:	8d 50 01             	lea    0x1(%eax),%edx
  1056fb:	89 55 10             	mov    %edx,0x10(%ebp)
  1056fe:	0f b6 00             	movzbl (%eax),%eax
  105701:	0f b6 d8             	movzbl %al,%ebx
  105704:	83 fb 25             	cmp    $0x25,%ebx
  105707:	75 d5                	jne    1056de <vprintfmt+0xa>
        }

        // Process a %-escape sequence
        char padc = ' ';
  105709:	c6 45 db 20          	movb   $0x20,-0x25(%ebp)
        width = precision = -1;
  10570d:	c7 45 e4 ff ff ff ff 	movl   $0xffffffff,-0x1c(%ebp)
  105714:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  105717:	89 45 e8             	mov    %eax,-0x18(%ebp)
        lflag = altflag = 0;
  10571a:	c7 45 dc 00 00 00 00 	movl   $0x0,-0x24(%ebp)
  105721:	8b 45 dc             	mov    -0x24(%ebp),%eax
  105724:	89 45 e0             	mov    %eax,-0x20(%ebp)

    reswitch:
        switch (ch = *(unsigned char *)fmt ++) {
  105727:	8b 45 10             	mov    0x10(%ebp),%eax
  10572a:	8d 50 01             	lea    0x1(%eax),%edx
  10572d:	89 55 10             	mov    %edx,0x10(%ebp)
  105730:	0f b6 00             	movzbl (%eax),%eax
  105733:	0f b6 d8             	movzbl %al,%ebx
  105736:	8d 43 dd             	lea    -0x23(%ebx),%eax
  105739:	83 f8 55             	cmp    $0x55,%eax
  10573c:	0f 87 37 03 00 00    	ja     105a79 <vprintfmt+0x3a5>
  105742:	8b 04 85 20 72 10 00 	mov    0x107220(,%eax,4),%eax
  105749:	ff e0                	jmp    *%eax

        // flag to pad on the right
        case '-':
            padc = '-';
  10574b:	c6 45 db 2d          	movb   $0x2d,-0x25(%ebp)
            goto reswitch;
  10574f:	eb d6                	jmp    105727 <vprintfmt+0x53>

        // flag to pad with 0's instead of spaces
        case '0':
            padc = '0';
  105751:	c6 45 db 30          	movb   $0x30,-0x25(%ebp)
            goto reswitch;
  105755:	eb d0                	jmp    105727 <vprintfmt+0x53>

        // width field
        case '1' ... '9':
            for (precision = 0; ; ++ fmt) {
  105757:	c7 45 e4 00 00 00 00 	movl   $0x0,-0x1c(%ebp)
                precision = precision * 10 + ch - '0';
  10575e:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  105761:	89 d0                	mov    %edx,%eax
  105763:	c1 e0 02             	shl    $0x2,%eax
  105766:	01 d0                	add    %edx,%eax
  105768:	01 c0                	add    %eax,%eax
  10576a:	01 d8                	add    %ebx,%eax
  10576c:	83 e8 30             	sub    $0x30,%eax
  10576f:	89 45 e4             	mov    %eax,-0x1c(%ebp)
                ch = *fmt;
  105772:	8b 45 10             	mov    0x10(%ebp),%eax
  105775:	0f b6 00             	movzbl (%eax),%eax
  105778:	0f be d8             	movsbl %al,%ebx
                if (ch < '0' || ch > '9') {
  10577b:	83 fb 2f             	cmp    $0x2f,%ebx
  10577e:	7e 38                	jle    1057b8 <vprintfmt+0xe4>
  105780:	83 fb 39             	cmp    $0x39,%ebx
  105783:	7f 33                	jg     1057b8 <vprintfmt+0xe4>
            for (precision = 0; ; ++ fmt) {
  105785:	ff 45 10             	incl   0x10(%ebp)
                precision = precision * 10 + ch - '0';
  105788:	eb d4                	jmp    10575e <vprintfmt+0x8a>
                }
            }
            goto process_precision;

        case '*':
            precision = va_arg(ap, int);
  10578a:	8b 45 14             	mov    0x14(%ebp),%eax
  10578d:	8d 50 04             	lea    0x4(%eax),%edx
  105790:	89 55 14             	mov    %edx,0x14(%ebp)
  105793:	8b 00                	mov    (%eax),%eax
  105795:	89 45 e4             	mov    %eax,-0x1c(%ebp)
            goto process_precision;
  105798:	eb 1f                	jmp    1057b9 <vprintfmt+0xe5>

        case '.':
            if (width < 0)
  10579a:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  10579e:	79 87                	jns    105727 <vprintfmt+0x53>
                width = 0;
  1057a0:	c7 45 e8 00 00 00 00 	movl   $0x0,-0x18(%ebp)
            goto reswitch;
  1057a7:	e9 7b ff ff ff       	jmp    105727 <vprintfmt+0x53>

        case '#':
            altflag = 1;
  1057ac:	c7 45 dc 01 00 00 00 	movl   $0x1,-0x24(%ebp)
            goto reswitch;
  1057b3:	e9 6f ff ff ff       	jmp    105727 <vprintfmt+0x53>
            goto process_precision;
  1057b8:	90                   	nop

        process_precision:
            if (width < 0)
  1057b9:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  1057bd:	0f 89 64 ff ff ff    	jns    105727 <vprintfmt+0x53>
                width = precision, precision = -1;
  1057c3:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  1057c6:	89 45 e8             	mov    %eax,-0x18(%ebp)
  1057c9:	c7 45 e4 ff ff ff ff 	movl   $0xffffffff,-0x1c(%ebp)
            goto reswitch;
  1057d0:	e9 52 ff ff ff       	jmp    105727 <vprintfmt+0x53>

        // long flag (doubled for long long)
        case 'l':
            lflag ++;
  1057d5:	ff 45 e0             	incl   -0x20(%ebp)
            goto reswitch;
  1057d8:	e9 4a ff ff ff       	jmp    105727 <vprintfmt+0x53>

        // character
        case 'c':
            putch(va_arg(ap, int), putdat);
  1057dd:	8b 45 14             	mov    0x14(%ebp),%eax
  1057e0:	8d 50 04             	lea    0x4(%eax),%edx
  1057e3:	89 55 14             	mov    %edx,0x14(%ebp)
  1057e6:	8b 00                	mov    (%eax),%eax
  1057e8:	8b 55 0c             	mov    0xc(%ebp),%edx
  1057eb:	89 54 24 04          	mov    %edx,0x4(%esp)
  1057ef:	89 04 24             	mov    %eax,(%esp)
  1057f2:	8b 45 08             	mov    0x8(%ebp),%eax
  1057f5:	ff d0                	call   *%eax
            break;
  1057f7:	e9 a4 02 00 00       	jmp    105aa0 <vprintfmt+0x3cc>

        // error message
        case 'e':
            err = va_arg(ap, int);
  1057fc:	8b 45 14             	mov    0x14(%ebp),%eax
  1057ff:	8d 50 04             	lea    0x4(%eax),%edx
  105802:	89 55 14             	mov    %edx,0x14(%ebp)
  105805:	8b 18                	mov    (%eax),%ebx
            if (err < 0) {
  105807:	85 db                	test   %ebx,%ebx
  105809:	79 02                	jns    10580d <vprintfmt+0x139>
                err = -err;
  10580b:	f7 db                	neg    %ebx
            }
            if (err > MAXERROR || (p = error_string[err]) == NULL) {
  10580d:	83 fb 06             	cmp    $0x6,%ebx
  105810:	7f 0b                	jg     10581d <vprintfmt+0x149>
  105812:	8b 34 9d e0 71 10 00 	mov    0x1071e0(,%ebx,4),%esi
  105819:	85 f6                	test   %esi,%esi
  10581b:	75 23                	jne    105840 <vprintfmt+0x16c>
                printfmt(putch, putdat, "error %d", err);
  10581d:	89 5c 24 0c          	mov    %ebx,0xc(%esp)
  105821:	c7 44 24 08 0d 72 10 	movl   $0x10720d,0x8(%esp)
  105828:	00 
  105829:	8b 45 0c             	mov    0xc(%ebp),%eax
  10582c:	89 44 24 04          	mov    %eax,0x4(%esp)
  105830:	8b 45 08             	mov    0x8(%ebp),%eax
  105833:	89 04 24             	mov    %eax,(%esp)
  105836:	e8 68 fe ff ff       	call   1056a3 <printfmt>
            }
            else {
                printfmt(putch, putdat, "%s", p);
            }
            break;
  10583b:	e9 60 02 00 00       	jmp    105aa0 <vprintfmt+0x3cc>
                printfmt(putch, putdat, "%s", p);
  105840:	89 74 24 0c          	mov    %esi,0xc(%esp)
  105844:	c7 44 24 08 16 72 10 	movl   $0x107216,0x8(%esp)
  10584b:	00 
  10584c:	8b 45 0c             	mov    0xc(%ebp),%eax
  10584f:	89 44 24 04          	mov    %eax,0x4(%esp)
  105853:	8b 45 08             	mov    0x8(%ebp),%eax
  105856:	89 04 24             	mov    %eax,(%esp)
  105859:	e8 45 fe ff ff       	call   1056a3 <printfmt>
            break;
  10585e:	e9 3d 02 00 00       	jmp    105aa0 <vprintfmt+0x3cc>

        // string
        case 's':
            if ((p = va_arg(ap, char *)) == NULL) {
  105863:	8b 45 14             	mov    0x14(%ebp),%eax
  105866:	8d 50 04             	lea    0x4(%eax),%edx
  105869:	89 55 14             	mov    %edx,0x14(%ebp)
  10586c:	8b 30                	mov    (%eax),%esi
  10586e:	85 f6                	test   %esi,%esi
  105870:	75 05                	jne    105877 <vprintfmt+0x1a3>
                p = "(null)";
  105872:	be 19 72 10 00       	mov    $0x107219,%esi
            }
            if (width > 0 && padc != '-') {
  105877:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  10587b:	7e 76                	jle    1058f3 <vprintfmt+0x21f>
  10587d:	80 7d db 2d          	cmpb   $0x2d,-0x25(%ebp)
  105881:	74 70                	je     1058f3 <vprintfmt+0x21f>
                for (width -= strnlen(p, precision); width > 0; width --) {
  105883:	8b 45 e4             	mov    -0x1c(%ebp),%eax
  105886:	89 44 24 04          	mov    %eax,0x4(%esp)
  10588a:	89 34 24             	mov    %esi,(%esp)
  10588d:	e8 16 03 00 00       	call   105ba8 <strnlen>
  105892:	89 c2                	mov    %eax,%edx
  105894:	8b 45 e8             	mov    -0x18(%ebp),%eax
  105897:	29 d0                	sub    %edx,%eax
  105899:	89 45 e8             	mov    %eax,-0x18(%ebp)
  10589c:	eb 16                	jmp    1058b4 <vprintfmt+0x1e0>
                    putch(padc, putdat);
  10589e:	0f be 45 db          	movsbl -0x25(%ebp),%eax
  1058a2:	8b 55 0c             	mov    0xc(%ebp),%edx
  1058a5:	89 54 24 04          	mov    %edx,0x4(%esp)
  1058a9:	89 04 24             	mov    %eax,(%esp)
  1058ac:	8b 45 08             	mov    0x8(%ebp),%eax
  1058af:	ff d0                	call   *%eax
                for (width -= strnlen(p, precision); width > 0; width --) {
  1058b1:	ff 4d e8             	decl   -0x18(%ebp)
  1058b4:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  1058b8:	7f e4                	jg     10589e <vprintfmt+0x1ca>
                }
            }
            for (; (ch = *p ++) != '\0' && (precision < 0 || -- precision >= 0); width --) {
  1058ba:	eb 37                	jmp    1058f3 <vprintfmt+0x21f>
                if (altflag && (ch < ' ' || ch > '~')) {
  1058bc:	83 7d dc 00          	cmpl   $0x0,-0x24(%ebp)
  1058c0:	74 1f                	je     1058e1 <vprintfmt+0x20d>
  1058c2:	83 fb 1f             	cmp    $0x1f,%ebx
  1058c5:	7e 05                	jle    1058cc <vprintfmt+0x1f8>
  1058c7:	83 fb 7e             	cmp    $0x7e,%ebx
  1058ca:	7e 15                	jle    1058e1 <vprintfmt+0x20d>
                    putch('?', putdat);
  1058cc:	8b 45 0c             	mov    0xc(%ebp),%eax
  1058cf:	89 44 24 04          	mov    %eax,0x4(%esp)
  1058d3:	c7 04 24 3f 00 00 00 	movl   $0x3f,(%esp)
  1058da:	8b 45 08             	mov    0x8(%ebp),%eax
  1058dd:	ff d0                	call   *%eax
  1058df:	eb 0f                	jmp    1058f0 <vprintfmt+0x21c>
                }
                else {
                    putch(ch, putdat);
  1058e1:	8b 45 0c             	mov    0xc(%ebp),%eax
  1058e4:	89 44 24 04          	mov    %eax,0x4(%esp)
  1058e8:	89 1c 24             	mov    %ebx,(%esp)
  1058eb:	8b 45 08             	mov    0x8(%ebp),%eax
  1058ee:	ff d0                	call   *%eax
            for (; (ch = *p ++) != '\0' && (precision < 0 || -- precision >= 0); width --) {
  1058f0:	ff 4d e8             	decl   -0x18(%ebp)
  1058f3:	89 f0                	mov    %esi,%eax
  1058f5:	8d 70 01             	lea    0x1(%eax),%esi
  1058f8:	0f b6 00             	movzbl (%eax),%eax
  1058fb:	0f be d8             	movsbl %al,%ebx
  1058fe:	85 db                	test   %ebx,%ebx
  105900:	74 27                	je     105929 <vprintfmt+0x255>
  105902:	83 7d e4 00          	cmpl   $0x0,-0x1c(%ebp)
  105906:	78 b4                	js     1058bc <vprintfmt+0x1e8>
  105908:	ff 4d e4             	decl   -0x1c(%ebp)
  10590b:	83 7d e4 00          	cmpl   $0x0,-0x1c(%ebp)
  10590f:	79 ab                	jns    1058bc <vprintfmt+0x1e8>
                }
            }
            for (; width > 0; width --) {
  105911:	eb 16                	jmp    105929 <vprintfmt+0x255>
                putch(' ', putdat);
  105913:	8b 45 0c             	mov    0xc(%ebp),%eax
  105916:	89 44 24 04          	mov    %eax,0x4(%esp)
  10591a:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
  105921:	8b 45 08             	mov    0x8(%ebp),%eax
  105924:	ff d0                	call   *%eax
            for (; width > 0; width --) {
  105926:	ff 4d e8             	decl   -0x18(%ebp)
  105929:	83 7d e8 00          	cmpl   $0x0,-0x18(%ebp)
  10592d:	7f e4                	jg     105913 <vprintfmt+0x23f>
            }
            break;
  10592f:	e9 6c 01 00 00       	jmp    105aa0 <vprintfmt+0x3cc>

        // (signed) decimal
        case 'd':
            num = getint(&ap, lflag);
  105934:	8b 45 e0             	mov    -0x20(%ebp),%eax
  105937:	89 44 24 04          	mov    %eax,0x4(%esp)
  10593b:	8d 45 14             	lea    0x14(%ebp),%eax
  10593e:	89 04 24             	mov    %eax,(%esp)
  105941:	e8 16 fd ff ff       	call   10565c <getint>
  105946:	89 45 f0             	mov    %eax,-0x10(%ebp)
  105949:	89 55 f4             	mov    %edx,-0xc(%ebp)
            if ((long long)num < 0) {
  10594c:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10594f:	8b 55 f4             	mov    -0xc(%ebp),%edx
  105952:	85 d2                	test   %edx,%edx
  105954:	79 26                	jns    10597c <vprintfmt+0x2a8>
                putch('-', putdat);
  105956:	8b 45 0c             	mov    0xc(%ebp),%eax
  105959:	89 44 24 04          	mov    %eax,0x4(%esp)
  10595d:	c7 04 24 2d 00 00 00 	movl   $0x2d,(%esp)
  105964:	8b 45 08             	mov    0x8(%ebp),%eax
  105967:	ff d0                	call   *%eax
                num = -(long long)num;
  105969:	8b 45 f0             	mov    -0x10(%ebp),%eax
  10596c:	8b 55 f4             	mov    -0xc(%ebp),%edx
  10596f:	f7 d8                	neg    %eax
  105971:	83 d2 00             	adc    $0x0,%edx
  105974:	f7 da                	neg    %edx
  105976:	89 45 f0             	mov    %eax,-0x10(%ebp)
  105979:	89 55 f4             	mov    %edx,-0xc(%ebp)
            }
            base = 10;
  10597c:	c7 45 ec 0a 00 00 00 	movl   $0xa,-0x14(%ebp)
            goto number;
  105983:	e9 a8 00 00 00       	jmp    105a30 <vprintfmt+0x35c>

        // unsigned decimal
        case 'u':
            num = getuint(&ap, lflag);
  105988:	8b 45 e0             	mov    -0x20(%ebp),%eax
  10598b:	89 44 24 04          	mov    %eax,0x4(%esp)
  10598f:	8d 45 14             	lea    0x14(%ebp),%eax
  105992:	89 04 24             	mov    %eax,(%esp)
  105995:	e8 73 fc ff ff       	call   10560d <getuint>
  10599a:	89 45 f0             	mov    %eax,-0x10(%ebp)
  10599d:	89 55 f4             	mov    %edx,-0xc(%ebp)
            base = 10;
  1059a0:	c7 45 ec 0a 00 00 00 	movl   $0xa,-0x14(%ebp)
            goto number;
  1059a7:	e9 84 00 00 00       	jmp    105a30 <vprintfmt+0x35c>

        // (unsigned) octal
        case 'o':
            num = getuint(&ap, lflag);
  1059ac:	8b 45 e0             	mov    -0x20(%ebp),%eax
  1059af:	89 44 24 04          	mov    %eax,0x4(%esp)
  1059b3:	8d 45 14             	lea    0x14(%ebp),%eax
  1059b6:	89 04 24             	mov    %eax,(%esp)
  1059b9:	e8 4f fc ff ff       	call   10560d <getuint>
  1059be:	89 45 f0             	mov    %eax,-0x10(%ebp)
  1059c1:	89 55 f4             	mov    %edx,-0xc(%ebp)
            base = 8;
  1059c4:	c7 45 ec 08 00 00 00 	movl   $0x8,-0x14(%ebp)
            goto number;
  1059cb:	eb 63                	jmp    105a30 <vprintfmt+0x35c>

        // pointer
        case 'p':
            putch('0', putdat);
  1059cd:	8b 45 0c             	mov    0xc(%ebp),%eax
  1059d0:	89 44 24 04          	mov    %eax,0x4(%esp)
  1059d4:	c7 04 24 30 00 00 00 	movl   $0x30,(%esp)
  1059db:	8b 45 08             	mov    0x8(%ebp),%eax
  1059de:	ff d0                	call   *%eax
            putch('x', putdat);
  1059e0:	8b 45 0c             	mov    0xc(%ebp),%eax
  1059e3:	89 44 24 04          	mov    %eax,0x4(%esp)
  1059e7:	c7 04 24 78 00 00 00 	movl   $0x78,(%esp)
  1059ee:	8b 45 08             	mov    0x8(%ebp),%eax
  1059f1:	ff d0                	call   *%eax
            num = (unsigned long long)(uintptr_t)va_arg(ap, void *);
  1059f3:	8b 45 14             	mov    0x14(%ebp),%eax
  1059f6:	8d 50 04             	lea    0x4(%eax),%edx
  1059f9:	89 55 14             	mov    %edx,0x14(%ebp)
  1059fc:	8b 00                	mov    (%eax),%eax
  1059fe:	89 45 f0             	mov    %eax,-0x10(%ebp)
  105a01:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
            base = 16;
  105a08:	c7 45 ec 10 00 00 00 	movl   $0x10,-0x14(%ebp)
            goto number;
  105a0f:	eb 1f                	jmp    105a30 <vprintfmt+0x35c>

        // (unsigned) hexadecimal
        case 'x':
            num = getuint(&ap, lflag);
  105a11:	8b 45 e0             	mov    -0x20(%ebp),%eax
  105a14:	89 44 24 04          	mov    %eax,0x4(%esp)
  105a18:	8d 45 14             	lea    0x14(%ebp),%eax
  105a1b:	89 04 24             	mov    %eax,(%esp)
  105a1e:	e8 ea fb ff ff       	call   10560d <getuint>
  105a23:	89 45 f0             	mov    %eax,-0x10(%ebp)
  105a26:	89 55 f4             	mov    %edx,-0xc(%ebp)
            base = 16;
  105a29:	c7 45 ec 10 00 00 00 	movl   $0x10,-0x14(%ebp)
        number:
            printnum(putch, putdat, num, base, width, padc);
  105a30:	0f be 55 db          	movsbl -0x25(%ebp),%edx
  105a34:	8b 45 ec             	mov    -0x14(%ebp),%eax
  105a37:	89 54 24 18          	mov    %edx,0x18(%esp)
  105a3b:	8b 55 e8             	mov    -0x18(%ebp),%edx
  105a3e:	89 54 24 14          	mov    %edx,0x14(%esp)
  105a42:	89 44 24 10          	mov    %eax,0x10(%esp)
  105a46:	8b 45 f0             	mov    -0x10(%ebp),%eax
  105a49:	8b 55 f4             	mov    -0xc(%ebp),%edx
  105a4c:	89 44 24 08          	mov    %eax,0x8(%esp)
  105a50:	89 54 24 0c          	mov    %edx,0xc(%esp)
  105a54:	8b 45 0c             	mov    0xc(%ebp),%eax
  105a57:	89 44 24 04          	mov    %eax,0x4(%esp)
  105a5b:	8b 45 08             	mov    0x8(%ebp),%eax
  105a5e:	89 04 24             	mov    %eax,(%esp)
  105a61:	e8 a5 fa ff ff       	call   10550b <printnum>
            break;
  105a66:	eb 38                	jmp    105aa0 <vprintfmt+0x3cc>

        // escaped '%' character
        case '%':
            putch(ch, putdat);
  105a68:	8b 45 0c             	mov    0xc(%ebp),%eax
  105a6b:	89 44 24 04          	mov    %eax,0x4(%esp)
  105a6f:	89 1c 24             	mov    %ebx,(%esp)
  105a72:	8b 45 08             	mov    0x8(%ebp),%eax
  105a75:	ff d0                	call   *%eax
            break;
  105a77:	eb 27                	jmp    105aa0 <vprintfmt+0x3cc>

        // unrecognized escape sequence - just print it literally
        default:
            putch('%', putdat);
  105a79:	8b 45 0c             	mov    0xc(%ebp),%eax
  105a7c:	89 44 24 04          	mov    %eax,0x4(%esp)
  105a80:	c7 04 24 25 00 00 00 	movl   $0x25,(%esp)
  105a87:	8b 45 08             	mov    0x8(%ebp),%eax
  105a8a:	ff d0                	call   *%eax
            for (fmt --; fmt[-1] != '%'; fmt --)
  105a8c:	ff 4d 10             	decl   0x10(%ebp)
  105a8f:	eb 03                	jmp    105a94 <vprintfmt+0x3c0>
  105a91:	ff 4d 10             	decl   0x10(%ebp)
  105a94:	8b 45 10             	mov    0x10(%ebp),%eax
  105a97:	48                   	dec    %eax
  105a98:	0f b6 00             	movzbl (%eax),%eax
  105a9b:	3c 25                	cmp    $0x25,%al
  105a9d:	75 f2                	jne    105a91 <vprintfmt+0x3bd>
                /* do nothing */;
            break;
  105a9f:	90                   	nop
    while (1) {
  105aa0:	e9 37 fc ff ff       	jmp    1056dc <vprintfmt+0x8>
                return;
  105aa5:	90                   	nop
        }
    }
}
  105aa6:	83 c4 40             	add    $0x40,%esp
  105aa9:	5b                   	pop    %ebx
  105aaa:	5e                   	pop    %esi
  105aab:	5d                   	pop    %ebp
  105aac:	c3                   	ret    

00105aad <sprintputch>:
 * sprintputch - 'print' a single character in a buffer
 * @ch:         the character will be printed
 * @b:          the buffer to place the character @ch
 * */
static void
sprintputch(int ch, struct sprintbuf *b) {
  105aad:	55                   	push   %ebp
  105aae:	89 e5                	mov    %esp,%ebp
    b->cnt ++;
  105ab0:	8b 45 0c             	mov    0xc(%ebp),%eax
  105ab3:	8b 40 08             	mov    0x8(%eax),%eax
  105ab6:	8d 50 01             	lea    0x1(%eax),%edx
  105ab9:	8b 45 0c             	mov    0xc(%ebp),%eax
  105abc:	89 50 08             	mov    %edx,0x8(%eax)
    if (b->buf < b->ebuf) {
  105abf:	8b 45 0c             	mov    0xc(%ebp),%eax
  105ac2:	8b 10                	mov    (%eax),%edx
  105ac4:	8b 45 0c             	mov    0xc(%ebp),%eax
  105ac7:	8b 40 04             	mov    0x4(%eax),%eax
  105aca:	39 c2                	cmp    %eax,%edx
  105acc:	73 12                	jae    105ae0 <sprintputch+0x33>
        *b->buf ++ = ch;
  105ace:	8b 45 0c             	mov    0xc(%ebp),%eax
  105ad1:	8b 00                	mov    (%eax),%eax
  105ad3:	8d 48 01             	lea    0x1(%eax),%ecx
  105ad6:	8b 55 0c             	mov    0xc(%ebp),%edx
  105ad9:	89 0a                	mov    %ecx,(%edx)
  105adb:	8b 55 08             	mov    0x8(%ebp),%edx
  105ade:	88 10                	mov    %dl,(%eax)
    }
}
  105ae0:	90                   	nop
  105ae1:	5d                   	pop    %ebp
  105ae2:	c3                   	ret    

00105ae3 <snprintf>:
 * @str:        the buffer to place the result into
 * @size:       the size of buffer, including the trailing null space
 * @fmt:        the format string to use
 * */
int
snprintf(char *str, size_t size, const char *fmt, ...) {
  105ae3:	55                   	push   %ebp
  105ae4:	89 e5                	mov    %esp,%ebp
  105ae6:	83 ec 28             	sub    $0x28,%esp
    va_list ap;
    int cnt;
    va_start(ap, fmt);
  105ae9:	8d 45 14             	lea    0x14(%ebp),%eax
  105aec:	89 45 f0             	mov    %eax,-0x10(%ebp)
    cnt = vsnprintf(str, size, fmt, ap);
  105aef:	8b 45 f0             	mov    -0x10(%ebp),%eax
  105af2:	89 44 24 0c          	mov    %eax,0xc(%esp)
  105af6:	8b 45 10             	mov    0x10(%ebp),%eax
  105af9:	89 44 24 08          	mov    %eax,0x8(%esp)
  105afd:	8b 45 0c             	mov    0xc(%ebp),%eax
  105b00:	89 44 24 04          	mov    %eax,0x4(%esp)
  105b04:	8b 45 08             	mov    0x8(%ebp),%eax
  105b07:	89 04 24             	mov    %eax,(%esp)
  105b0a:	e8 0a 00 00 00       	call   105b19 <vsnprintf>
  105b0f:	89 45 f4             	mov    %eax,-0xc(%ebp)
    va_end(ap);
    return cnt;
  105b12:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  105b15:	89 ec                	mov    %ebp,%esp
  105b17:	5d                   	pop    %ebp
  105b18:	c3                   	ret    

00105b19 <vsnprintf>:
 *
 * Call this function if you are already dealing with a va_list.
 * Or you probably want snprintf() instead.
 * */
int
vsnprintf(char *str, size_t size, const char *fmt, va_list ap) {
  105b19:	55                   	push   %ebp
  105b1a:	89 e5                	mov    %esp,%ebp
  105b1c:	83 ec 28             	sub    $0x28,%esp
    struct sprintbuf b = {str, str + size - 1, 0};
  105b1f:	8b 45 08             	mov    0x8(%ebp),%eax
  105b22:	89 45 ec             	mov    %eax,-0x14(%ebp)
  105b25:	8b 45 0c             	mov    0xc(%ebp),%eax
  105b28:	8d 50 ff             	lea    -0x1(%eax),%edx
  105b2b:	8b 45 08             	mov    0x8(%ebp),%eax
  105b2e:	01 d0                	add    %edx,%eax
  105b30:	89 45 f0             	mov    %eax,-0x10(%ebp)
  105b33:	c7 45 f4 00 00 00 00 	movl   $0x0,-0xc(%ebp)
    if (str == NULL || b.buf > b.ebuf) {
  105b3a:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
  105b3e:	74 0a                	je     105b4a <vsnprintf+0x31>
  105b40:	8b 55 ec             	mov    -0x14(%ebp),%edx
  105b43:	8b 45 f0             	mov    -0x10(%ebp),%eax
  105b46:	39 c2                	cmp    %eax,%edx
  105b48:	76 07                	jbe    105b51 <vsnprintf+0x38>
        return -E_INVAL;
  105b4a:	b8 fd ff ff ff       	mov    $0xfffffffd,%eax
  105b4f:	eb 2a                	jmp    105b7b <vsnprintf+0x62>
    }
    // print the string to the buffer
    vprintfmt((void*)sprintputch, &b, fmt, ap);
  105b51:	8b 45 14             	mov    0x14(%ebp),%eax
  105b54:	89 44 24 0c          	mov    %eax,0xc(%esp)
  105b58:	8b 45 10             	mov    0x10(%ebp),%eax
  105b5b:	89 44 24 08          	mov    %eax,0x8(%esp)
  105b5f:	8d 45 ec             	lea    -0x14(%ebp),%eax
  105b62:	89 44 24 04          	mov    %eax,0x4(%esp)
  105b66:	c7 04 24 ad 5a 10 00 	movl   $0x105aad,(%esp)
  105b6d:	e8 62 fb ff ff       	call   1056d4 <vprintfmt>
    // null terminate the buffer
    *b.buf = '\0';
  105b72:	8b 45 ec             	mov    -0x14(%ebp),%eax
  105b75:	c6 00 00             	movb   $0x0,(%eax)
    return b.cnt;
  105b78:	8b 45 f4             	mov    -0xc(%ebp),%eax
}
  105b7b:	89 ec                	mov    %ebp,%esp
  105b7d:	5d                   	pop    %ebp
  105b7e:	c3                   	ret    

00105b7f <strlen>:
 * @s:      the input string
 *
 * The strlen() function returns the length of string @s.
 * */
size_t
strlen(const char *s) {
  105b7f:	55                   	push   %ebp
  105b80:	89 e5                	mov    %esp,%ebp
  105b82:	83 ec 10             	sub    $0x10,%esp
    size_t cnt = 0;
  105b85:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
    while (*s ++ != '\0') {
  105b8c:	eb 03                	jmp    105b91 <strlen+0x12>
        cnt ++;
  105b8e:	ff 45 fc             	incl   -0x4(%ebp)
    while (*s ++ != '\0') {
  105b91:	8b 45 08             	mov    0x8(%ebp),%eax
  105b94:	8d 50 01             	lea    0x1(%eax),%edx
  105b97:	89 55 08             	mov    %edx,0x8(%ebp)
  105b9a:	0f b6 00             	movzbl (%eax),%eax
  105b9d:	84 c0                	test   %al,%al
  105b9f:	75 ed                	jne    105b8e <strlen+0xf>
    }
    return cnt;
  105ba1:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  105ba4:	89 ec                	mov    %ebp,%esp
  105ba6:	5d                   	pop    %ebp
  105ba7:	c3                   	ret    

00105ba8 <strnlen>:
 * The return value is strlen(s), if that is less than @len, or
 * @len if there is no '\0' character among the first @len characters
 * pointed by @s.
 * */
size_t
strnlen(const char *s, size_t len) {
  105ba8:	55                   	push   %ebp
  105ba9:	89 e5                	mov    %esp,%ebp
  105bab:	83 ec 10             	sub    $0x10,%esp
    size_t cnt = 0;
  105bae:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
    while (cnt < len && *s ++ != '\0') {
  105bb5:	eb 03                	jmp    105bba <strnlen+0x12>
        cnt ++;
  105bb7:	ff 45 fc             	incl   -0x4(%ebp)
    while (cnt < len && *s ++ != '\0') {
  105bba:	8b 45 fc             	mov    -0x4(%ebp),%eax
  105bbd:	3b 45 0c             	cmp    0xc(%ebp),%eax
  105bc0:	73 10                	jae    105bd2 <strnlen+0x2a>
  105bc2:	8b 45 08             	mov    0x8(%ebp),%eax
  105bc5:	8d 50 01             	lea    0x1(%eax),%edx
  105bc8:	89 55 08             	mov    %edx,0x8(%ebp)
  105bcb:	0f b6 00             	movzbl (%eax),%eax
  105bce:	84 c0                	test   %al,%al
  105bd0:	75 e5                	jne    105bb7 <strnlen+0xf>
    }
    return cnt;
  105bd2:	8b 45 fc             	mov    -0x4(%ebp),%eax
}
  105bd5:	89 ec                	mov    %ebp,%esp
  105bd7:	5d                   	pop    %ebp
  105bd8:	c3                   	ret    

00105bd9 <strcpy>:
 * To avoid overflows, the size of array pointed by @dst should be long enough to
 * contain the same string as @src (including the terminating null character), and
 * should not overlap in memory with @src.
 * */
char *
strcpy(char *dst, const char *src) {
  105bd9:	55                   	push   %ebp
  105bda:	89 e5                	mov    %esp,%ebp
  105bdc:	57                   	push   %edi
  105bdd:	56                   	push   %esi
  105bde:	83 ec 20             	sub    $0x20,%esp
  105be1:	8b 45 08             	mov    0x8(%ebp),%eax
  105be4:	89 45 f4             	mov    %eax,-0xc(%ebp)
  105be7:	8b 45 0c             	mov    0xc(%ebp),%eax
  105bea:	89 45 f0             	mov    %eax,-0x10(%ebp)
#ifndef __HAVE_ARCH_STRCPY
#define __HAVE_ARCH_STRCPY
static inline char *
__strcpy(char *dst, const char *src) {
    int d0, d1, d2;
    asm volatile (
  105bed:	8b 55 f0             	mov    -0x10(%ebp),%edx
  105bf0:	8b 45 f4             	mov    -0xc(%ebp),%eax
  105bf3:	89 d1                	mov    %edx,%ecx
  105bf5:	89 c2                	mov    %eax,%edx
  105bf7:	89 ce                	mov    %ecx,%esi
  105bf9:	89 d7                	mov    %edx,%edi
  105bfb:	ac                   	lods   %ds:(%esi),%al
  105bfc:	aa                   	stos   %al,%es:(%edi)
  105bfd:	84 c0                	test   %al,%al
  105bff:	75 fa                	jne    105bfb <strcpy+0x22>
  105c01:	89 fa                	mov    %edi,%edx
  105c03:	89 f1                	mov    %esi,%ecx
  105c05:	89 4d ec             	mov    %ecx,-0x14(%ebp)
  105c08:	89 55 e8             	mov    %edx,-0x18(%ebp)
  105c0b:	89 45 e4             	mov    %eax,-0x1c(%ebp)
        "stosb;"
        "testb %%al, %%al;"
        "jne 1b;"
        : "=&S" (d0), "=&D" (d1), "=&a" (d2)
        : "0" (src), "1" (dst) : "memory");
    return dst;
  105c0e:	8b 45 f4             	mov    -0xc(%ebp),%eax
    char *p = dst;
    while ((*p ++ = *src ++) != '\0')
        /* nothing */;
    return dst;
#endif /* __HAVE_ARCH_STRCPY */
}
  105c11:	83 c4 20             	add    $0x20,%esp
  105c14:	5e                   	pop    %esi
  105c15:	5f                   	pop    %edi
  105c16:	5d                   	pop    %ebp
  105c17:	c3                   	ret    

00105c18 <strncpy>:
 * @len:    maximum number of characters to be copied from @src
 *
 * The return value is @dst
 * */
char *
strncpy(char *dst, const char *src, size_t len) {
  105c18:	55                   	push   %ebp
  105c19:	89 e5                	mov    %esp,%ebp
  105c1b:	83 ec 10             	sub    $0x10,%esp
    char *p = dst;
  105c1e:	8b 45 08             	mov    0x8(%ebp),%eax
  105c21:	89 45 fc             	mov    %eax,-0x4(%ebp)
    while (len > 0) {
  105c24:	eb 1e                	jmp    105c44 <strncpy+0x2c>
        if ((*p = *src) != '\0') {
  105c26:	8b 45 0c             	mov    0xc(%ebp),%eax
  105c29:	0f b6 10             	movzbl (%eax),%edx
  105c2c:	8b 45 fc             	mov    -0x4(%ebp),%eax
  105c2f:	88 10                	mov    %dl,(%eax)
  105c31:	8b 45 fc             	mov    -0x4(%ebp),%eax
  105c34:	0f b6 00             	movzbl (%eax),%eax
  105c37:	84 c0                	test   %al,%al
  105c39:	74 03                	je     105c3e <strncpy+0x26>
            src ++;
  105c3b:	ff 45 0c             	incl   0xc(%ebp)
        }
        p ++, len --;
  105c3e:	ff 45 fc             	incl   -0x4(%ebp)
  105c41:	ff 4d 10             	decl   0x10(%ebp)
    while (len > 0) {
  105c44:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  105c48:	75 dc                	jne    105c26 <strncpy+0xe>
    }
    return dst;
  105c4a:	8b 45 08             	mov    0x8(%ebp),%eax
}
  105c4d:	89 ec                	mov    %ebp,%esp
  105c4f:	5d                   	pop    %ebp
  105c50:	c3                   	ret    

00105c51 <strcmp>:
 * - A value greater than zero indicates that the first character that does
 *   not match has a greater value in @s1 than in @s2;
 * - And a value less than zero indicates the opposite.
 * */
int
strcmp(const char *s1, const char *s2) {
  105c51:	55                   	push   %ebp
  105c52:	89 e5                	mov    %esp,%ebp
  105c54:	57                   	push   %edi
  105c55:	56                   	push   %esi
  105c56:	83 ec 20             	sub    $0x20,%esp
  105c59:	8b 45 08             	mov    0x8(%ebp),%eax
  105c5c:	89 45 f4             	mov    %eax,-0xc(%ebp)
  105c5f:	8b 45 0c             	mov    0xc(%ebp),%eax
  105c62:	89 45 f0             	mov    %eax,-0x10(%ebp)
    asm volatile (
  105c65:	8b 55 f4             	mov    -0xc(%ebp),%edx
  105c68:	8b 45 f0             	mov    -0x10(%ebp),%eax
  105c6b:	89 d1                	mov    %edx,%ecx
  105c6d:	89 c2                	mov    %eax,%edx
  105c6f:	89 ce                	mov    %ecx,%esi
  105c71:	89 d7                	mov    %edx,%edi
  105c73:	ac                   	lods   %ds:(%esi),%al
  105c74:	ae                   	scas   %es:(%edi),%al
  105c75:	75 08                	jne    105c7f <strcmp+0x2e>
  105c77:	84 c0                	test   %al,%al
  105c79:	75 f8                	jne    105c73 <strcmp+0x22>
  105c7b:	31 c0                	xor    %eax,%eax
  105c7d:	eb 04                	jmp    105c83 <strcmp+0x32>
  105c7f:	19 c0                	sbb    %eax,%eax
  105c81:	0c 01                	or     $0x1,%al
  105c83:	89 fa                	mov    %edi,%edx
  105c85:	89 f1                	mov    %esi,%ecx
  105c87:	89 45 ec             	mov    %eax,-0x14(%ebp)
  105c8a:	89 4d e8             	mov    %ecx,-0x18(%ebp)
  105c8d:	89 55 e4             	mov    %edx,-0x1c(%ebp)
    return ret;
  105c90:	8b 45 ec             	mov    -0x14(%ebp),%eax
    while (*s1 != '\0' && *s1 == *s2) {
        s1 ++, s2 ++;
    }
    return (int)((unsigned char)*s1 - (unsigned char)*s2);
#endif /* __HAVE_ARCH_STRCMP */
}
  105c93:	83 c4 20             	add    $0x20,%esp
  105c96:	5e                   	pop    %esi
  105c97:	5f                   	pop    %edi
  105c98:	5d                   	pop    %ebp
  105c99:	c3                   	ret    

00105c9a <strncmp>:
 * they are equal to each other, it continues with the following pairs until
 * the characters differ, until a terminating null-character is reached, or
 * until @n characters match in both strings, whichever happens first.
 * */
int
strncmp(const char *s1, const char *s2, size_t n) {
  105c9a:	55                   	push   %ebp
  105c9b:	89 e5                	mov    %esp,%ebp
    while (n > 0 && *s1 != '\0' && *s1 == *s2) {
  105c9d:	eb 09                	jmp    105ca8 <strncmp+0xe>
        n --, s1 ++, s2 ++;
  105c9f:	ff 4d 10             	decl   0x10(%ebp)
  105ca2:	ff 45 08             	incl   0x8(%ebp)
  105ca5:	ff 45 0c             	incl   0xc(%ebp)
    while (n > 0 && *s1 != '\0' && *s1 == *s2) {
  105ca8:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  105cac:	74 1a                	je     105cc8 <strncmp+0x2e>
  105cae:	8b 45 08             	mov    0x8(%ebp),%eax
  105cb1:	0f b6 00             	movzbl (%eax),%eax
  105cb4:	84 c0                	test   %al,%al
  105cb6:	74 10                	je     105cc8 <strncmp+0x2e>
  105cb8:	8b 45 08             	mov    0x8(%ebp),%eax
  105cbb:	0f b6 10             	movzbl (%eax),%edx
  105cbe:	8b 45 0c             	mov    0xc(%ebp),%eax
  105cc1:	0f b6 00             	movzbl (%eax),%eax
  105cc4:	38 c2                	cmp    %al,%dl
  105cc6:	74 d7                	je     105c9f <strncmp+0x5>
    }
    return (n == 0) ? 0 : (int)((unsigned char)*s1 - (unsigned char)*s2);
  105cc8:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  105ccc:	74 18                	je     105ce6 <strncmp+0x4c>
  105cce:	8b 45 08             	mov    0x8(%ebp),%eax
  105cd1:	0f b6 00             	movzbl (%eax),%eax
  105cd4:	0f b6 d0             	movzbl %al,%edx
  105cd7:	8b 45 0c             	mov    0xc(%ebp),%eax
  105cda:	0f b6 00             	movzbl (%eax),%eax
  105cdd:	0f b6 c8             	movzbl %al,%ecx
  105ce0:	89 d0                	mov    %edx,%eax
  105ce2:	29 c8                	sub    %ecx,%eax
  105ce4:	eb 05                	jmp    105ceb <strncmp+0x51>
  105ce6:	b8 00 00 00 00       	mov    $0x0,%eax
}
  105ceb:	5d                   	pop    %ebp
  105cec:	c3                   	ret    

00105ced <strchr>:
 *
 * The strchr() function returns a pointer to the first occurrence of
 * character in @s. If the value is not found, the function returns 'NULL'.
 * */
char *
strchr(const char *s, char c) {
  105ced:	55                   	push   %ebp
  105cee:	89 e5                	mov    %esp,%ebp
  105cf0:	83 ec 04             	sub    $0x4,%esp
  105cf3:	8b 45 0c             	mov    0xc(%ebp),%eax
  105cf6:	88 45 fc             	mov    %al,-0x4(%ebp)
    while (*s != '\0') {
  105cf9:	eb 13                	jmp    105d0e <strchr+0x21>
        if (*s == c) {
  105cfb:	8b 45 08             	mov    0x8(%ebp),%eax
  105cfe:	0f b6 00             	movzbl (%eax),%eax
  105d01:	38 45 fc             	cmp    %al,-0x4(%ebp)
  105d04:	75 05                	jne    105d0b <strchr+0x1e>
            return (char *)s;
  105d06:	8b 45 08             	mov    0x8(%ebp),%eax
  105d09:	eb 12                	jmp    105d1d <strchr+0x30>
        }
        s ++;
  105d0b:	ff 45 08             	incl   0x8(%ebp)
    while (*s != '\0') {
  105d0e:	8b 45 08             	mov    0x8(%ebp),%eax
  105d11:	0f b6 00             	movzbl (%eax),%eax
  105d14:	84 c0                	test   %al,%al
  105d16:	75 e3                	jne    105cfb <strchr+0xe>
    }
    return NULL;
  105d18:	b8 00 00 00 00       	mov    $0x0,%eax
}
  105d1d:	89 ec                	mov    %ebp,%esp
  105d1f:	5d                   	pop    %ebp
  105d20:	c3                   	ret    

00105d21 <strfind>:
 * The strfind() function is like strchr() except that if @c is
 * not found in @s, then it returns a pointer to the null byte at the
 * end of @s, rather than 'NULL'.
 * */
char *
strfind(const char *s, char c) {
  105d21:	55                   	push   %ebp
  105d22:	89 e5                	mov    %esp,%ebp
  105d24:	83 ec 04             	sub    $0x4,%esp
  105d27:	8b 45 0c             	mov    0xc(%ebp),%eax
  105d2a:	88 45 fc             	mov    %al,-0x4(%ebp)
    while (*s != '\0') {
  105d2d:	eb 0e                	jmp    105d3d <strfind+0x1c>
        if (*s == c) {
  105d2f:	8b 45 08             	mov    0x8(%ebp),%eax
  105d32:	0f b6 00             	movzbl (%eax),%eax
  105d35:	38 45 fc             	cmp    %al,-0x4(%ebp)
  105d38:	74 0f                	je     105d49 <strfind+0x28>
            break;
        }
        s ++;
  105d3a:	ff 45 08             	incl   0x8(%ebp)
    while (*s != '\0') {
  105d3d:	8b 45 08             	mov    0x8(%ebp),%eax
  105d40:	0f b6 00             	movzbl (%eax),%eax
  105d43:	84 c0                	test   %al,%al
  105d45:	75 e8                	jne    105d2f <strfind+0xe>
  105d47:	eb 01                	jmp    105d4a <strfind+0x29>
            break;
  105d49:	90                   	nop
    }
    return (char *)s;
  105d4a:	8b 45 08             	mov    0x8(%ebp),%eax
}
  105d4d:	89 ec                	mov    %ebp,%esp
  105d4f:	5d                   	pop    %ebp
  105d50:	c3                   	ret    

00105d51 <strtol>:
 * an optional "0x" or "0X" prefix.
 *
 * The strtol() function returns the converted integral number as a long int value.
 * */
long
strtol(const char *s, char **endptr, int base) {
  105d51:	55                   	push   %ebp
  105d52:	89 e5                	mov    %esp,%ebp
  105d54:	83 ec 10             	sub    $0x10,%esp
    int neg = 0;
  105d57:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%ebp)
    long val = 0;
  105d5e:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%ebp)

    // gobble initial whitespace
    while (*s == ' ' || *s == '\t') {
  105d65:	eb 03                	jmp    105d6a <strtol+0x19>
        s ++;
  105d67:	ff 45 08             	incl   0x8(%ebp)
    while (*s == ' ' || *s == '\t') {
  105d6a:	8b 45 08             	mov    0x8(%ebp),%eax
  105d6d:	0f b6 00             	movzbl (%eax),%eax
  105d70:	3c 20                	cmp    $0x20,%al
  105d72:	74 f3                	je     105d67 <strtol+0x16>
  105d74:	8b 45 08             	mov    0x8(%ebp),%eax
  105d77:	0f b6 00             	movzbl (%eax),%eax
  105d7a:	3c 09                	cmp    $0x9,%al
  105d7c:	74 e9                	je     105d67 <strtol+0x16>
    }

    // plus/minus sign
    if (*s == '+') {
  105d7e:	8b 45 08             	mov    0x8(%ebp),%eax
  105d81:	0f b6 00             	movzbl (%eax),%eax
  105d84:	3c 2b                	cmp    $0x2b,%al
  105d86:	75 05                	jne    105d8d <strtol+0x3c>
        s ++;
  105d88:	ff 45 08             	incl   0x8(%ebp)
  105d8b:	eb 14                	jmp    105da1 <strtol+0x50>
    }
    else if (*s == '-') {
  105d8d:	8b 45 08             	mov    0x8(%ebp),%eax
  105d90:	0f b6 00             	movzbl (%eax),%eax
  105d93:	3c 2d                	cmp    $0x2d,%al
  105d95:	75 0a                	jne    105da1 <strtol+0x50>
        s ++, neg = 1;
  105d97:	ff 45 08             	incl   0x8(%ebp)
  105d9a:	c7 45 fc 01 00 00 00 	movl   $0x1,-0x4(%ebp)
    }

    // hex or octal base prefix
    if ((base == 0 || base == 16) && (s[0] == '0' && s[1] == 'x')) {
  105da1:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  105da5:	74 06                	je     105dad <strtol+0x5c>
  105da7:	83 7d 10 10          	cmpl   $0x10,0x10(%ebp)
  105dab:	75 22                	jne    105dcf <strtol+0x7e>
  105dad:	8b 45 08             	mov    0x8(%ebp),%eax
  105db0:	0f b6 00             	movzbl (%eax),%eax
  105db3:	3c 30                	cmp    $0x30,%al
  105db5:	75 18                	jne    105dcf <strtol+0x7e>
  105db7:	8b 45 08             	mov    0x8(%ebp),%eax
  105dba:	40                   	inc    %eax
  105dbb:	0f b6 00             	movzbl (%eax),%eax
  105dbe:	3c 78                	cmp    $0x78,%al
  105dc0:	75 0d                	jne    105dcf <strtol+0x7e>
        s += 2, base = 16;
  105dc2:	83 45 08 02          	addl   $0x2,0x8(%ebp)
  105dc6:	c7 45 10 10 00 00 00 	movl   $0x10,0x10(%ebp)
  105dcd:	eb 29                	jmp    105df8 <strtol+0xa7>
    }
    else if (base == 0 && s[0] == '0') {
  105dcf:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  105dd3:	75 16                	jne    105deb <strtol+0x9a>
  105dd5:	8b 45 08             	mov    0x8(%ebp),%eax
  105dd8:	0f b6 00             	movzbl (%eax),%eax
  105ddb:	3c 30                	cmp    $0x30,%al
  105ddd:	75 0c                	jne    105deb <strtol+0x9a>
        s ++, base = 8;
  105ddf:	ff 45 08             	incl   0x8(%ebp)
  105de2:	c7 45 10 08 00 00 00 	movl   $0x8,0x10(%ebp)
  105de9:	eb 0d                	jmp    105df8 <strtol+0xa7>
    }
    else if (base == 0) {
  105deb:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
  105def:	75 07                	jne    105df8 <strtol+0xa7>
        base = 10;
  105df1:	c7 45 10 0a 00 00 00 	movl   $0xa,0x10(%ebp)

    // digits
    while (1) {
        int dig;

        if (*s >= '0' && *s <= '9') {
  105df8:	8b 45 08             	mov    0x8(%ebp),%eax
  105dfb:	0f b6 00             	movzbl (%eax),%eax
  105dfe:	3c 2f                	cmp    $0x2f,%al
  105e00:	7e 1b                	jle    105e1d <strtol+0xcc>
  105e02:	8b 45 08             	mov    0x8(%ebp),%eax
  105e05:	0f b6 00             	movzbl (%eax),%eax
  105e08:	3c 39                	cmp    $0x39,%al
  105e0a:	7f 11                	jg     105e1d <strtol+0xcc>
            dig = *s - '0';
  105e0c:	8b 45 08             	mov    0x8(%ebp),%eax
  105e0f:	0f b6 00             	movzbl (%eax),%eax
  105e12:	0f be c0             	movsbl %al,%eax
  105e15:	83 e8 30             	sub    $0x30,%eax
  105e18:	89 45 f4             	mov    %eax,-0xc(%ebp)
  105e1b:	eb 48                	jmp    105e65 <strtol+0x114>
        }
        else if (*s >= 'a' && *s <= 'z') {
  105e1d:	8b 45 08             	mov    0x8(%ebp),%eax
  105e20:	0f b6 00             	movzbl (%eax),%eax
  105e23:	3c 60                	cmp    $0x60,%al
  105e25:	7e 1b                	jle    105e42 <strtol+0xf1>
  105e27:	8b 45 08             	mov    0x8(%ebp),%eax
  105e2a:	0f b6 00             	movzbl (%eax),%eax
  105e2d:	3c 7a                	cmp    $0x7a,%al
  105e2f:	7f 11                	jg     105e42 <strtol+0xf1>
            dig = *s - 'a' + 10;
  105e31:	8b 45 08             	mov    0x8(%ebp),%eax
  105e34:	0f b6 00             	movzbl (%eax),%eax
  105e37:	0f be c0             	movsbl %al,%eax
  105e3a:	83 e8 57             	sub    $0x57,%eax
  105e3d:	89 45 f4             	mov    %eax,-0xc(%ebp)
  105e40:	eb 23                	jmp    105e65 <strtol+0x114>
        }
        else if (*s >= 'A' && *s <= 'Z') {
  105e42:	8b 45 08             	mov    0x8(%ebp),%eax
  105e45:	0f b6 00             	movzbl (%eax),%eax
  105e48:	3c 40                	cmp    $0x40,%al
  105e4a:	7e 3b                	jle    105e87 <strtol+0x136>
  105e4c:	8b 45 08             	mov    0x8(%ebp),%eax
  105e4f:	0f b6 00             	movzbl (%eax),%eax
  105e52:	3c 5a                	cmp    $0x5a,%al
  105e54:	7f 31                	jg     105e87 <strtol+0x136>
            dig = *s - 'A' + 10;
  105e56:	8b 45 08             	mov    0x8(%ebp),%eax
  105e59:	0f b6 00             	movzbl (%eax),%eax
  105e5c:	0f be c0             	movsbl %al,%eax
  105e5f:	83 e8 37             	sub    $0x37,%eax
  105e62:	89 45 f4             	mov    %eax,-0xc(%ebp)
        }
        else {
            break;
        }
        if (dig >= base) {
  105e65:	8b 45 f4             	mov    -0xc(%ebp),%eax
  105e68:	3b 45 10             	cmp    0x10(%ebp),%eax
  105e6b:	7d 19                	jge    105e86 <strtol+0x135>
            break;
        }
        s ++, val = (val * base) + dig;
  105e6d:	ff 45 08             	incl   0x8(%ebp)
  105e70:	8b 45 f8             	mov    -0x8(%ebp),%eax
  105e73:	0f af 45 10          	imul   0x10(%ebp),%eax
  105e77:	89 c2                	mov    %eax,%edx
  105e79:	8b 45 f4             	mov    -0xc(%ebp),%eax
  105e7c:	01 d0                	add    %edx,%eax
  105e7e:	89 45 f8             	mov    %eax,-0x8(%ebp)
    while (1) {
  105e81:	e9 72 ff ff ff       	jmp    105df8 <strtol+0xa7>
            break;
  105e86:	90                   	nop
        // we don't properly detect overflow!
    }

    if (endptr) {
  105e87:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
  105e8b:	74 08                	je     105e95 <strtol+0x144>
        *endptr = (char *) s;
  105e8d:	8b 45 0c             	mov    0xc(%ebp),%eax
  105e90:	8b 55 08             	mov    0x8(%ebp),%edx
  105e93:	89 10                	mov    %edx,(%eax)
    }
    return (neg ? -val : val);
  105e95:	83 7d fc 00          	cmpl   $0x0,-0x4(%ebp)
  105e99:	74 07                	je     105ea2 <strtol+0x151>
  105e9b:	8b 45 f8             	mov    -0x8(%ebp),%eax
  105e9e:	f7 d8                	neg    %eax
  105ea0:	eb 03                	jmp    105ea5 <strtol+0x154>
  105ea2:	8b 45 f8             	mov    -0x8(%ebp),%eax
}
  105ea5:	89 ec                	mov    %ebp,%esp
  105ea7:	5d                   	pop    %ebp
  105ea8:	c3                   	ret    

00105ea9 <memset>:
 * @n:      number of bytes to be set to the value
 *
 * The memset() function returns @s.
 * */
void *
memset(void *s, char c, size_t n) {
  105ea9:	55                   	push   %ebp
  105eaa:	89 e5                	mov    %esp,%ebp
  105eac:	83 ec 28             	sub    $0x28,%esp
  105eaf:	89 7d fc             	mov    %edi,-0x4(%ebp)
  105eb2:	8b 45 0c             	mov    0xc(%ebp),%eax
  105eb5:	88 45 d8             	mov    %al,-0x28(%ebp)
#ifdef __HAVE_ARCH_MEMSET
    return __memset(s, c, n);
  105eb8:	0f be 55 d8          	movsbl -0x28(%ebp),%edx
  105ebc:	8b 45 08             	mov    0x8(%ebp),%eax
  105ebf:	89 45 f8             	mov    %eax,-0x8(%ebp)
  105ec2:	88 55 f7             	mov    %dl,-0x9(%ebp)
  105ec5:	8b 45 10             	mov    0x10(%ebp),%eax
  105ec8:	89 45 f0             	mov    %eax,-0x10(%ebp)
#ifndef __HAVE_ARCH_MEMSET
#define __HAVE_ARCH_MEMSET
static inline void *
__memset(void *s, char c, size_t n) {
    int d0, d1;
    asm volatile (
  105ecb:	8b 4d f0             	mov    -0x10(%ebp),%ecx
  105ece:	0f b6 45 f7          	movzbl -0x9(%ebp),%eax
  105ed2:	8b 55 f8             	mov    -0x8(%ebp),%edx
  105ed5:	89 d7                	mov    %edx,%edi
  105ed7:	f3 aa                	rep stos %al,%es:(%edi)
  105ed9:	89 fa                	mov    %edi,%edx
  105edb:	89 4d ec             	mov    %ecx,-0x14(%ebp)
  105ede:	89 55 e8             	mov    %edx,-0x18(%ebp)
        "rep; stosb;"
        : "=&c" (d0), "=&D" (d1)
        : "0" (n), "a" (c), "1" (s)
        : "memory");
    return s;
  105ee1:	8b 45 f8             	mov    -0x8(%ebp),%eax
    while (n -- > 0) {
        *p ++ = c;
    }
    return s;
#endif /* __HAVE_ARCH_MEMSET */
}
  105ee4:	8b 7d fc             	mov    -0x4(%ebp),%edi
  105ee7:	89 ec                	mov    %ebp,%esp
  105ee9:	5d                   	pop    %ebp
  105eea:	c3                   	ret    

00105eeb <memmove>:
 * @n:      number of bytes to copy
 *
 * The memmove() function returns @dst.
 * */
void *
memmove(void *dst, const void *src, size_t n) {
  105eeb:	55                   	push   %ebp
  105eec:	89 e5                	mov    %esp,%ebp
  105eee:	57                   	push   %edi
  105eef:	56                   	push   %esi
  105ef0:	53                   	push   %ebx
  105ef1:	83 ec 30             	sub    $0x30,%esp
  105ef4:	8b 45 08             	mov    0x8(%ebp),%eax
  105ef7:	89 45 f0             	mov    %eax,-0x10(%ebp)
  105efa:	8b 45 0c             	mov    0xc(%ebp),%eax
  105efd:	89 45 ec             	mov    %eax,-0x14(%ebp)
  105f00:	8b 45 10             	mov    0x10(%ebp),%eax
  105f03:	89 45 e8             	mov    %eax,-0x18(%ebp)

#ifndef __HAVE_ARCH_MEMMOVE
#define __HAVE_ARCH_MEMMOVE
static inline void *
__memmove(void *dst, const void *src, size_t n) {
    if (dst < src) {
  105f06:	8b 45 f0             	mov    -0x10(%ebp),%eax
  105f09:	3b 45 ec             	cmp    -0x14(%ebp),%eax
  105f0c:	73 42                	jae    105f50 <memmove+0x65>
  105f0e:	8b 45 f0             	mov    -0x10(%ebp),%eax
  105f11:	89 45 e4             	mov    %eax,-0x1c(%ebp)
  105f14:	8b 45 ec             	mov    -0x14(%ebp),%eax
  105f17:	89 45 e0             	mov    %eax,-0x20(%ebp)
  105f1a:	8b 45 e8             	mov    -0x18(%ebp),%eax
  105f1d:	89 45 dc             	mov    %eax,-0x24(%ebp)
        "andl $3, %%ecx;"
        "jz 1f;"
        "rep; movsb;"
        "1:"
        : "=&c" (d0), "=&D" (d1), "=&S" (d2)
        : "0" (n / 4), "g" (n), "1" (dst), "2" (src)
  105f20:	8b 45 dc             	mov    -0x24(%ebp),%eax
  105f23:	c1 e8 02             	shr    $0x2,%eax
  105f26:	89 c1                	mov    %eax,%ecx
    asm volatile (
  105f28:	8b 55 e4             	mov    -0x1c(%ebp),%edx
  105f2b:	8b 45 e0             	mov    -0x20(%ebp),%eax
  105f2e:	89 d7                	mov    %edx,%edi
  105f30:	89 c6                	mov    %eax,%esi
  105f32:	f3 a5                	rep movsl %ds:(%esi),%es:(%edi)
  105f34:	8b 4d dc             	mov    -0x24(%ebp),%ecx
  105f37:	83 e1 03             	and    $0x3,%ecx
  105f3a:	74 02                	je     105f3e <memmove+0x53>
  105f3c:	f3 a4                	rep movsb %ds:(%esi),%es:(%edi)
  105f3e:	89 f0                	mov    %esi,%eax
  105f40:	89 fa                	mov    %edi,%edx
  105f42:	89 4d d8             	mov    %ecx,-0x28(%ebp)
  105f45:	89 55 d4             	mov    %edx,-0x2c(%ebp)
  105f48:	89 45 d0             	mov    %eax,-0x30(%ebp)
        : "memory");
    return dst;
  105f4b:	8b 45 e4             	mov    -0x1c(%ebp),%eax
        return __memcpy(dst, src, n);
  105f4e:	eb 36                	jmp    105f86 <memmove+0x9b>
        : "0" (n), "1" (n - 1 + src), "2" (n - 1 + dst)
  105f50:	8b 45 e8             	mov    -0x18(%ebp),%eax
  105f53:	8d 50 ff             	lea    -0x1(%eax),%edx
  105f56:	8b 45 ec             	mov    -0x14(%ebp),%eax
  105f59:	01 c2                	add    %eax,%edx
  105f5b:	8b 45 e8             	mov    -0x18(%ebp),%eax
  105f5e:	8d 48 ff             	lea    -0x1(%eax),%ecx
  105f61:	8b 45 f0             	mov    -0x10(%ebp),%eax
  105f64:	8d 1c 01             	lea    (%ecx,%eax,1),%ebx
    asm volatile (
  105f67:	8b 45 e8             	mov    -0x18(%ebp),%eax
  105f6a:	89 c1                	mov    %eax,%ecx
  105f6c:	89 d8                	mov    %ebx,%eax
  105f6e:	89 d6                	mov    %edx,%esi
  105f70:	89 c7                	mov    %eax,%edi
  105f72:	fd                   	std    
  105f73:	f3 a4                	rep movsb %ds:(%esi),%es:(%edi)
  105f75:	fc                   	cld    
  105f76:	89 f8                	mov    %edi,%eax
  105f78:	89 f2                	mov    %esi,%edx
  105f7a:	89 4d cc             	mov    %ecx,-0x34(%ebp)
  105f7d:	89 55 c8             	mov    %edx,-0x38(%ebp)
  105f80:	89 45 c4             	mov    %eax,-0x3c(%ebp)
    return dst;
  105f83:	8b 45 f0             	mov    -0x10(%ebp),%eax
            *d ++ = *s ++;
        }
    }
    return dst;
#endif /* __HAVE_ARCH_MEMMOVE */
}
  105f86:	83 c4 30             	add    $0x30,%esp
  105f89:	5b                   	pop    %ebx
  105f8a:	5e                   	pop    %esi
  105f8b:	5f                   	pop    %edi
  105f8c:	5d                   	pop    %ebp
  105f8d:	c3                   	ret    

00105f8e <memcpy>:
 * it always copies exactly @n bytes. To avoid overflows, the size of arrays pointed
 * by both @src and @dst, should be at least @n bytes, and should not overlap
 * (for overlapping memory area, memmove is a safer approach).
 * */
void *
memcpy(void *dst, const void *src, size_t n) {
  105f8e:	55                   	push   %ebp
  105f8f:	89 e5                	mov    %esp,%ebp
  105f91:	57                   	push   %edi
  105f92:	56                   	push   %esi
  105f93:	83 ec 20             	sub    $0x20,%esp
  105f96:	8b 45 08             	mov    0x8(%ebp),%eax
  105f99:	89 45 f4             	mov    %eax,-0xc(%ebp)
  105f9c:	8b 45 0c             	mov    0xc(%ebp),%eax
  105f9f:	89 45 f0             	mov    %eax,-0x10(%ebp)
  105fa2:	8b 45 10             	mov    0x10(%ebp),%eax
  105fa5:	89 45 ec             	mov    %eax,-0x14(%ebp)
        : "0" (n / 4), "g" (n), "1" (dst), "2" (src)
  105fa8:	8b 45 ec             	mov    -0x14(%ebp),%eax
  105fab:	c1 e8 02             	shr    $0x2,%eax
  105fae:	89 c1                	mov    %eax,%ecx
    asm volatile (
  105fb0:	8b 55 f4             	mov    -0xc(%ebp),%edx
  105fb3:	8b 45 f0             	mov    -0x10(%ebp),%eax
  105fb6:	89 d7                	mov    %edx,%edi
  105fb8:	89 c6                	mov    %eax,%esi
  105fba:	f3 a5                	rep movsl %ds:(%esi),%es:(%edi)
  105fbc:	8b 4d ec             	mov    -0x14(%ebp),%ecx
  105fbf:	83 e1 03             	and    $0x3,%ecx
  105fc2:	74 02                	je     105fc6 <memcpy+0x38>
  105fc4:	f3 a4                	rep movsb %ds:(%esi),%es:(%edi)
  105fc6:	89 f0                	mov    %esi,%eax
  105fc8:	89 fa                	mov    %edi,%edx
  105fca:	89 4d e8             	mov    %ecx,-0x18(%ebp)
  105fcd:	89 55 e4             	mov    %edx,-0x1c(%ebp)
  105fd0:	89 45 e0             	mov    %eax,-0x20(%ebp)
    return dst;
  105fd3:	8b 45 f4             	mov    -0xc(%ebp),%eax
    while (n -- > 0) {
        *d ++ = *s ++;
    }
    return dst;
#endif /* __HAVE_ARCH_MEMCPY */
}
  105fd6:	83 c4 20             	add    $0x20,%esp
  105fd9:	5e                   	pop    %esi
  105fda:	5f                   	pop    %edi
  105fdb:	5d                   	pop    %ebp
  105fdc:	c3                   	ret    

00105fdd <memcmp>:
 *   match in both memory blocks has a greater value in @v1 than in @v2
 *   as if evaluated as unsigned char values;
 * - And a value less than zero indicates the opposite.
 * */
int
memcmp(const void *v1, const void *v2, size_t n) {
  105fdd:	55                   	push   %ebp
  105fde:	89 e5                	mov    %esp,%ebp
  105fe0:	83 ec 10             	sub    $0x10,%esp
    const char *s1 = (const char *)v1;
  105fe3:	8b 45 08             	mov    0x8(%ebp),%eax
  105fe6:	89 45 fc             	mov    %eax,-0x4(%ebp)
    const char *s2 = (const char *)v2;
  105fe9:	8b 45 0c             	mov    0xc(%ebp),%eax
  105fec:	89 45 f8             	mov    %eax,-0x8(%ebp)
    while (n -- > 0) {
  105fef:	eb 2e                	jmp    10601f <memcmp+0x42>
        if (*s1 != *s2) {
  105ff1:	8b 45 fc             	mov    -0x4(%ebp),%eax
  105ff4:	0f b6 10             	movzbl (%eax),%edx
  105ff7:	8b 45 f8             	mov    -0x8(%ebp),%eax
  105ffa:	0f b6 00             	movzbl (%eax),%eax
  105ffd:	38 c2                	cmp    %al,%dl
  105fff:	74 18                	je     106019 <memcmp+0x3c>
            return (int)((unsigned char)*s1 - (unsigned char)*s2);
  106001:	8b 45 fc             	mov    -0x4(%ebp),%eax
  106004:	0f b6 00             	movzbl (%eax),%eax
  106007:	0f b6 d0             	movzbl %al,%edx
  10600a:	8b 45 f8             	mov    -0x8(%ebp),%eax
  10600d:	0f b6 00             	movzbl (%eax),%eax
  106010:	0f b6 c8             	movzbl %al,%ecx
  106013:	89 d0                	mov    %edx,%eax
  106015:	29 c8                	sub    %ecx,%eax
  106017:	eb 18                	jmp    106031 <memcmp+0x54>
        }
        s1 ++, s2 ++;
  106019:	ff 45 fc             	incl   -0x4(%ebp)
  10601c:	ff 45 f8             	incl   -0x8(%ebp)
    while (n -- > 0) {
  10601f:	8b 45 10             	mov    0x10(%ebp),%eax
  106022:	8d 50 ff             	lea    -0x1(%eax),%edx
  106025:	89 55 10             	mov    %edx,0x10(%ebp)
  106028:	85 c0                	test   %eax,%eax
  10602a:	75 c5                	jne    105ff1 <memcmp+0x14>
    }
    return 0;
  10602c:	b8 00 00 00 00       	mov    $0x0,%eax
}
  106031:	89 ec                	mov    %ebp,%esp
  106033:	5d                   	pop    %ebp
  106034:	c3                   	ret    
